This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Return code from Setup.exe?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 21, 2010
02:39 PM
Return code from Setup.exe?
Hi all:
I need to be able to “get” the return code returned by the Setup.exe file itself, not any return codes that come from InstallShield scripts…has anyone out there ever done that?
I tried the following commands in a batch file but no luck…
Setup.exe /v"/l*v c:\install.log" echo %errorlevel% >> C:\Install.log
Setup.exe echo %errorlevel% >> C:\Install.log
Thanks in advance for any and all advice.
John.
I need to be able to “get” the return code returned by the Setup.exe file itself, not any return codes that come from InstallShield scripts…has anyone out there ever done that?
I tried the following commands in a batch file but no luck…
Setup.exe /v"/l*v c:\install.log" echo %errorlevel% >> C:\Install.log
Setup.exe echo %errorlevel% >> C:\Install.log
Thanks in advance for any and all advice.
John.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 22, 2010
01:16 PM
If you are launching these command lines from a command prompt or batch file, you will likely always get 0 as the return code, since this is actually the result of whether the process on the command line launched successfully or not.
Normally, the exit code for a process is accessed by an API such as GetExitCodeProcess. This requires a handle to the process (normally returned by the CreateProcess API).
If you can get the batch file to wait for the process to exit, this might set the error level to the process exit code.
Normally, the exit code for a process is accessed by an API such as GetExitCodeProcess. This requires a handle to the process (normally returned by the CreateProcess API).
If you can get the batch file to wait for the process to exit, this might set the error level to the process exit code.