Quick tip for deployment task sequences
June 13, 2011
Posted by on
It is great when an application comes packaged with an MSI because it is so easy to deploy those, whether you are using MDT or Configuration Manager. However, sometimes you need to do a little bit more than just install the MSI – you might want to run a script to give you a bit more flexibility.
The problem is, though, that when you run msiexec to install the MSI, it returns straight away which isn’t very helpful if your script can’t do what it needs to do until the application has been properly installed.
Thankfully, the solution is quite simple. Instead of just executing the normal msiexec /i command, prefix it with start /wait (followed immediately with the rest of the normal command) and the MSI will get installed but the script won’t continue until it has completed. Any error code from the MSI installation is returned to your script.