If you are trying to use msiexec the windows installer, my experience has taught me that it immediately returns command to the user as soon as it starts executing. This is a problem in a script that depends on the install being done. If you want control to be returned only if the install is complete then try Start-Process. I didnt get all the way through the documentation for it but i did get as far as solving my problem;
msiexec /i "SSOMMCSnapInSetup.msi" /qr /log somelog.txt
returns right away but
Start-Process -FilePath msiexec -ArgumentList /i, "SSOMMCSnapInSetup.msi", /qr, /log, somelog.txt -Wait
only returns after the install is finished.
No comments:
Post a Comment