gcue Posted June 25, 2008 Share Posted June 25, 2008 (edited) I am trying to get around using sleep() I am running a psexec (which can execute commands on a remote machine) - problem is, i dont know when its done running the app. in this particular case it's updating an application (bloomberg) can any of you guys think of a creative way to figure out when a process is done running on a remote machine? RunWait(@ComSpec & " /c c:\cg\support\psexec \\" & $asset & " -d -i c:\temp\upbb.exe /s") Sleep(20000) While FileExists("\\" & $asset & "\c$\temp\upbb.exe") FileDelete("\\" & $asset & "\c$\temp\upbb.exe") WEnd Edited June 25, 2008 by gcue Link to comment Share on other sites More sharing options...
DjDeep00 Posted June 25, 2008 Share Posted June 25, 2008 @qcue...Did you try ShellExecuteWait() or you can just run the program and keep checking until the process doesnt exist using ProcessExists(). Link to comment Share on other sites More sharing options...
gcue Posted June 25, 2008 Author Share Posted June 25, 2008 processexists works for remote processes? hmm dont see that in the help Link to comment Share on other sites More sharing options...
DjDeep00 Posted June 25, 2008 Share Posted June 25, 2008 Look at this... Link to comment Share on other sites More sharing options...
gcue Posted June 25, 2008 Author Share Posted June 25, 2008 neat! thanks! =) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now