cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
TomCarey
Level 4

Launching powershell script causes Intaller to hang

Wrote a small powershell script for Windows 2008 R2 to enable FTP.
When I launch it from IA, using the "Execute Command" action with
"Suspend until process completes" checked, the Installer will "suspend"
forever.
I tried wrapping in a .bat file and using c:\windows\cmd instead of
just calling the powershell directly, but both has same behavior.

Any help appreciated...
Labels (1)
0 Kudos
(2) Replies
pv7721
Level 20

A couple of questions: is it mandatory for the installer to wait for the script to finish? If yes, maybe you can uncheck the "suspend" checkbox, and add a sleep after it, in order to make the installer wait for the completion.

Otherwise, could you try to rebuild your installer with IA 2012 and see if you still reproduce your issue?
0 Kudos
TomCarey
Level 4

Thanks for the quick response.
I don't need to wait for the command to complete to continue with the Install, but
I do need it to complete before the installation ends.
I did try not "suspending" and the results varied. Most times it worked,
but on a few faster machines, the install ended and rebooted before the PS command finished.
This left the system in a messed up state and of course no errors in the install log.

I'm going to try and work around the problem by killing the Powershell process as the last step in the script.

I'll re-post later if that works.

Note: Even if it does work, launching a PowerShell script from IA takes a very long to complete.
0 Kudos