PDA

View Full Version : Determining Status of an Install in Windows



kharkness
11-04-2011, 11:37 AM
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?

jerome_IA
11-07-2011, 08:20 AM
Hi,

Maybe you can launch your executable from batch file, thus it will return exit code when process will exit.

kharkness
11-07-2011, 10:41 AM
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