I'm trying to make an install script. I want to install an .msi file, Python, and then install other things after Python is installed. I already see how to do a command-line install. However, msiexec returns right away, even when the install is still running. How would I detect the completion of an msi install from a batch script?
| |||||
feedback
|
|
Don't know how Python handles passing commands off to Windows/DOS, but using a plain batch file and the For example, to install a main app, followed by a patch only when it's finished, and then a final program once that's finished, drop these lines into a .cmd file:
| |||||
feedback
|
|
It's tricky, and not reliable, but there are ways to monitor for the existence of a specific process in the process list. You write your loop to NOOP while waiting for that process to no longer be there, and then you do your next steps. There are a couple of ways of handling this. The SysInternals tool These methods merely monitor for the existence of a process, they can't check for the exit codes and therefore can't know whether or not a process exited normally or in an error state. For that, you'll have to process any MSI logs you specified be generated, or possibly dig in the Windows Even Log for error events. | |||
|
feedback
|