Jump to content

Pausing a script w/o WinWait


Recommended Posts

I am running a simple MSI based install with a setup.exe. Once setup.exe has kicked off msiexec, setup then closes. The only thing spawned by the MSI is one and at times two instances of msiexec. I would like to pause the script until this install is complete.

I tried...

$process = "msiexec.exe"
     While ProcessExists($process)
        Sleep(250)
     Wend

But found that I can't use it because SMS may be running msiexec under the local system account. During testing yesterday this method took 15 minutes for the script to move on because of SMS.

I also tried using WinWait() and providing the title of the window that is visible during the install (running the MSI with /passive switch). This didn't work either.

I suppose I could halt the SMS service, kill any running msiexec process then kick off my install but I would like to avoid that if possible. Anyone have any suggestions?

-Thanks.

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Link to comment
Share on other sites

Thinking out loud here...

Enumerate all the PIDs of any currently MSIEXEC.EXEs

Launch your setup

Wait a tiny bit

Enumerate all the PIDs of any currently MSIEXEC.EXEs again and look for deltas.

Use ProcessWaitClose with a PID to pause the script.

Yes - you could catch some MSIEXEC.EXE that just happened to start via SMS between your enumerations - but it seems to be a slight improvement over what you have now.

[size="1"][font="Arial"].[u].[/u][/font][/size]

Link to comment
Share on other sites

The WinWait should work - you should try harder to make it work - try the "window info" tool. You can paste the info in the tool here and i can try to give you the code that you need.You can also try the :

RunWait(@COMSPEC & " /c start C:\whatever.msi")

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...