JATO Posted December 16, 2005 Share Posted December 16, 2005 New to AutoIt v3 -- searched forum and couldn't find an answer Just trying to check if a 3rd partyMSI file is running or not and pause the script 'til it's done.. I figure the easiest way is to check if MSIEXEC.exe is running ?? right? so I used the ProcessExists function but AutoIt just stays paused forever. How do I get it to check and then move on? Here's my code.... If ProcessExists("msiexec.exe") = Then ProcessWaitClose("msiexec.exe") Endif Do I have the correct syntax? suggestions? JATO ~J. Schutzmanwww.alchemistgamer.com Link to comment Share on other sites More sharing options...
Valuater Posted December 16, 2005 Share Posted December 16, 2005 maybe this While ProcessExists("msiexec.exe") ToolTip("msiexec.exe is running", 0, 0) Sleep(20) WEnd 8) Link to comment Share on other sites More sharing options...
LxP Posted December 16, 2005 Share Posted December 16, 2005 You can just do this: ProcessWaitClose('msiexec.exe') It will automatically continue if the process does not initially exist. However you can also do these: If ProcessExists('msiexec.exe') Then ProcessWaitClose('msiexec.exe') EndIfIf ProcessExists('msiexec.exe') Then ProcessWaitClose('msiexec.exe') Link to comment Share on other sites More sharing options...
kjactive Posted December 16, 2005 Share Posted December 16, 2005 that's a tricky one or just a missspell If ProcessExists("msiexec.exe") = ? Then ProcessWaitClose("msiexec.exe") Endif try a bool quiesten!!! If ProcessExists("msiexec.exe") Then ProcessWaitClose("msiexec.exe") Endif kjactive Au3PP 4.1 - Autoit3 preprocessor, optimize speed, performance to scripts and do executes....[/url]Au3Calibur - Create libraries of commonly used code excerptsWords manipulate UDF, functions that is lent from the rexx language, topics and index file includedCustomDialog UDF to include custom made dialogs like a extended colorpick requester to scripts...[url="ftp://fritidshjemmet.com/Autoit3/SysColor.zip"]SysColor UDF a low level color library to manipulate RGB and Hex values...Shell32 UDF to Automate Windows® operating tasks from native dialog and Wizards browsers... Optimized the CodeWicard with options to generate browser code etc... Link to comment Share on other sites More sharing options...
JATO Posted December 18, 2005 Author Share Posted December 18, 2005 Maybe it's just Windows 2000 Adv. Server but the ProcessWaitClose ("msiexec.exe") wasn't working even though (in my opinion it would make sense .....that if MSIExec didn't exists at the time the command was called, the script should logically move on. -- So the script would pause indefinitely waiting for it to close when in fact it was never running in the first place. SO........... Finally used If $msi = 0 Then MsgBox(0, "MSI", "MSI is not running", 2);to test that IF statement woked FileCopy("$Lic", "$path") thanks for the help and I've learned a little about IF THEN statements ~J. Schutzmanwww.alchemistgamer.com Link to comment Share on other sites More sharing options...
Valuater Posted December 18, 2005 Share Posted December 18, 2005 we also like to help people that really try... like you not just asking for "hand-outs" 8) 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