this is something I've been struggling with for a while, sorry if I'm overseeing something obvious.
It concerns installers built for Windows. If you invoke your installer from the command line, like "cmd> myprod-0.1-windows-installer.exe --somearg ..." the installer immediately detaches from the shell foreground. That means, you get the shell prompt back immediately, while the installer is still running.
This might be fine for interactive use, but it makes automating installations quite a bit harder (We're trying to integrate the installation steps in our CI environment):
- For one thing, the exit code of the installer invocation is always
0, so you cannot use it in a chain of automated deploy steps to check if everything worked fine and you can proceed. You have no way of telling in the controlling process when the installer actually finishes, to e.g. verify installation or check logs.
- For another, we want to start multiple installers that install different parts of the system sequentially (Think of like 3 different *-installer.exe's started in a row from a .bat file). This is not possible, they are basically running concurrently which leads to arbitrary and strange behavior. I've tried to use the
<singleInstanceCheck>to make subsequent installer invocations wait until the previous has finished, but this seems to lead to dead locks (e.g. the first installer runs through fine but the second and third are then waiting on each other to finish).
So, is there a way to keep the installer in the shell's foreground?
Please sign in to leave a comment.