unhelpful %_SB_ERRORCODE%
I've had issue with this before - how do I know what the codes mean?
I'm getting a returned value of -1 on trying to Run an exe in SB6.... so
what does it mean?.. and how would I find that information?
Googling for Windows System Error Codes reveals that they *start* from 0.
http://msdn.microsoft.com/en-us/library/ms681381.aspx
So what then does -1 mean?
Steve
1 Attachment(s)
Re: unhelpful %_SB_ERRORCODE%
Think we might have an SB issue here.. the install & data dirs ARE set...
and the exe runs stand-alone with the command parameter.
But SB6 craps out with a -1 on the Run.
???
Steve Bywaters
Re: unhelpful %_SB_ERRORCODE%
> Think we might have an SB issue here.. the install & data dirs ARE set...
> and the exe runs stand-alone with the command parameter.
>
> But SB6 craps out with a -1 on the Run.
No, no SetupBuilder issue at all!
The return value for "Run Program" (you are using CreateProcess in your
screenshot to start the application) is -1 if the CreateProcess call failed
(e.g. program cannot be found, etc.)
-or-
if GetExitCodeProcess() failed to get a return code from that application
(you wait for)
-or-
if the application returns -1.
Hope this helps.
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
1 Attachment(s)
Re: unhelpful %_SB_ERRORCODE%
> Hope this helps.
Not really.....
1. Where do you get the info re. return code of -1? It is not in the list of
'system codes' that I found. If it is part of an internal list, it should be
published in the help
2. > is -1 if the CreateProcess call failed
> (e.g. program cannot be found, etc.)
The EXE *is* installed (see image1)
3. > if the application returns -1
There is no assigned return code from the sub-program - its just a normal
Clarion program terminating
4. > if GetExitCodeProcess() failed to get a return code from that
application (you wait for)
Don't really understand... but it doesn't wait an undue amount of time and
then time out - the sub-program just terminates immediately (as it should)
5. Most importantly: running in a CMD window the equivalent of
"%_SB_INSTALLDIR%\TscrUpgradeDistributor.exe TEST_TSCR" in the folder
"%_SB_DATADIR%" **DOES** work!!
All other sub-programs install and run OK
This one *works* standalone but not as a Run-call - it doesn't even enter
the 'init' part of the sub-program
What should I be looking at re. getting this Run call to work?
Steve
Re: unhelpful %_SB_ERRORCODE%
-1 means the GetLastError() Windows API did not receive any further error
code information after the call to CreateProcess -OR- your
TscrUpgradeDistributor returns -1. For example, returned to the calling
application through HALT([errorlevel])
I can't give you any other information. Your problem has nothing to do with
SetupBuilder!
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: unhelpful %_SB_ERRORCODE%
Steve
A couple of suggestions.
1) In case the OS has not written the new file to the hard disk, try adding a SLEEP(2)
between the two script lines
2) Check the Use ShellExecuteEx [x] box. See the notes in help if on a Vista or
Win2008 Server.
HTH
John Griffiths
Re: unhelpful %_SB_ERRORCODE%
> 2) Check the Use ShellExecuteEx [x] box. See the notes in help if on a
> Vista or
> Win2008 Server.
YES! That works.
But this is on a XP ("2007" Cool edition? unknown origin box).. what gives?
The problem did not occur on my XP SP3 development machine.. just on this
oddball I use for testing.
Sleep did not help, btw....
Thanks a lot, John
Steve
Re: unhelpful %_SB_ERRORCODE%
Just for fun, I created my own "TscrUpgradeDistributor.exe". When started,
this application displays the passed command line parameter and the current
folder.
I am using your "Run Program" configuration and it works perfect. My
%_SB_DATADIR% is set to c:\test. The COMMAND() function in the
TscrUpgradeDistributor.exe displays your TEST_TSCR command line switch
(correct) and LONGPATH() returns c:\test (also correct).
I can send you (or post it here) my test .sb6 project and the
"TscrUpgradeDistributor.exe" source codes.
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: unhelpful %_SB_ERRORCODE%
To demonstrate that it is NOT a SetupBuilder issue, I have uploaded the
TscrUpgradeDistributor.exe source code, binary, and runtest.sb6 project to:
www.lindersoft.com/projects/RunTest.zip
HTH,
--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910
SetupBuilder "point. click. ship"
Create Windows Vista ready installations in minutes
-- Official Comodo Code Signing and SSL Certificate Partner
Re: unhelpful %_SB_ERRORCODE%
Weird.. the installer runs perfectly on my XP/SP3 box
But it craps out on my test machine.., an XP/2007/Cool edition
Fortunately, John's suggestion of checking the UseShellExecute fixes it!!!
But I don't know why....
Steve