cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kharkness
Level 2

Determining Status of an Install in Windows

Windows platform only.
I have an installer (actually something which goes out and removes a previous installation) which the system admins I work with wish to run in silent mode through tools like SMS. I built the installer to rollback when it encounters certain situations and to "skip the install" in other situations.
I'd like to provide a way for the calling system to know if the install succeeded or failed. This would normally be done with some sort of return code from the .exe; however what I notice is that the installer exe runs in the background and returns control immediately (within a DOS Command window) Therefore, using a DOS return code (%ERRORLEVEL%) is meaningless.

Other than examining the console output file that is defined and trying to parse out the result, is there any way (a) to block until the installer finishes and (b) get the installer return back to the calling program?
Labels (1)
0 Kudos
(2) Replies
jerome_IA
Level 9

Hi,

Maybe you can launch your executable from batch file, thus it will return exit code when process will exit.
0 Kudos
kharkness
Level 2

Jerome,
Thank you. That appears to work.
I guess when running within a batch file, it waits for a return whereas when running from the command prompt directly, it does not wait/block.

ken
0 Kudos