Manojpalle Posted March 8, 2013 Share Posted March 8, 2013 Hi, I'm trying to run set.exe file using autoit script. For suppose I have already running set.exe file in my Pc and one of the instances of the same is running,now I want to kill the .exe file using autoit script and then run the .exe file from the script. Could anyone please clarify my doubt with a sample script for the same. Thanks in advance. Regards Manoj Link to comment Share on other sites More sharing options...
johnmcloud Posted March 8, 2013 Share Posted March 8, 2013 Check on the help: If...Else..EndIf ProcessClose ShellExecute( or Run) Link to comment Share on other sites More sharing options...
Nessie Posted March 8, 2013 Share Posted March 8, 2013 Try this: While 1 Sleep(1000) If ProcessExists("set.exe") Then ;The process that you want to check ProcessClose("set.exe") ;The process that you want to close Run("mynewsetup.exe");The process that you want to run EndIf WEnd My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s). My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all! My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file Link to comment Share on other sites More sharing options...
tommytx Posted May 6, 2013 Share Posted May 6, 2013 I am having this exact same problem... shutting down one when the other starts... else as I switch back and forth i have tons of exes running. Mine is complicated by the fact that it must change directories... I have tried a lot of stuff but just cannot get it to work.. My attempts While 1 Sleep(1000) If ProcessExists("RN_gui.exe") Then ;The process that you want to check ProcessClose("RN_gui.exe") ;The process that you want to close EndIf FileChangeDir('../BT_Master') Run("BT_gui.exe");The process that you want to run Wend Example from above... While 1 Sleep(1000) If ProcessExists("set.exe") Then ;The process that you want to check ProcessClose("set.exe") ;The process that you want to close Run("mynewsetup.exe");The process that you want to run EndIf WEnd Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 6, 2013 Moderators Share Posted May 6, 2013 Check _Singleton in the help file. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! 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