Floyd Posted April 19, 2010 Share Posted April 19, 2010 (edited) Hi guys, I'm new to this forum and this product as well. I'm trying to buil a simple script that verify if IE is open, if so, display a message to close all open Explorer windows. On the ok botton, force the close. if no IE process if found, just exit. Here's what I came up with. Any help would be really apreciate. Thanks in advance if ProcessExists("iexplorer.exe") Then MsgBox(0, "Installation of Exemple.exe", "Please close all Internet Explorer windows in order to proceed with the installation.") ProcessClose("iexplorer.exe") End If Else Exit Edited April 19, 2010 by Floyd Link to comment Share on other sites More sharing options...
OctopusCO Posted April 19, 2010 Share Posted April 19, 2010 I think the process you'll looking for is just "iexplore.exe" not "iexplorer.exe" . Don't forget you can always check the task manager (Shortcut: CTRL+Shift+Esc) then the process tab to verify which process is named what. Link to comment Share on other sites More sharing options...
Floyd Posted April 19, 2010 Author Share Posted April 19, 2010 I think the process you'll looking for is just "iexplore.exe" not "iexplorer.exe" . Don't forget you can always check the task manager (Shortcut: CTRL+Shift+Esc) then the process tab to verify which process is named what.Oh thanks for that. I should have said before it's giving the following error ERROR: syntax error : End if. So it dosent execute. Could somebody help me with the syntaxe error in order to have my script do what I describe in my initial post ?thanks much. Link to comment Share on other sites More sharing options...
PsaltyDS Posted April 19, 2010 Share Posted April 19, 2010 Your EndIf should be the last line. You posted it with Else coming after EndIf. Look up If/Else/EndIf again in the help file. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Floyd Posted April 19, 2010 Author Share Posted April 19, 2010 Your EndIf should be the last line. You posted it with Else coming after EndIf.Look up If/Else/EndIf again in the help file.This was what I was looking for . Oh and yeah the Endif was all in one word.Thanks for you help everyone.if ProcessExists("iexplore.exe") Then MsgBox(0, "Installation of Testapp.exe", "Please close all IE Windows",3600)EndIf$previousPID=-1 $PID = ProcessExists("iexplore.Exe") While $PID <> 0 If $previousPID<>$PID Then $previousPID=$PID ProcessClose($PID) EndIf sleep(2000) $PID = ProcessExists("iexplore.exe") WEndExit 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