The Brad Posted August 19, 2006 Share Posted August 19, 2006 I am probably missing something obvious here (I am relatively new to AutoIT), but I am having trouble with the RUN command. It seems to work for some programs and not others with no error message. Example: This works: Run("C:\Program Files\Microsoft Office\Office10\excel.exe") But this does not: Run("C:\Program Files\HQuote\hquote.exe") I double checked the path by pasting C:\Program Files\HQuote\hquote.exe into the Start --> Run and it worked...what am I doing wrong? Thanks Link to comment Share on other sites More sharing options...
PsaltyDS Posted August 19, 2006 Share Posted August 19, 2006 I am probably missing something obvious here (I am relatively new to AutoIT), but I am having trouble with the RUN command. It seems to work for some programs and not others with no error message. Example: This works: Run("C:\Program Files\Microsoft Office\Office10\excel.exe") But this does not: Run("C:\Program Files\HQuote\hquote.exe") I double checked the path by pasting C:\Program Files\HQuote\hquote.exe into the Start --> Run and it worked...what am I doing wrong? Thanks Try giving it a valid Temp directory: Run("C:\Program Files\HQuote\hquote.exe", @TempDir, @SW_SHOW) 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...
Valuater Posted August 19, 2006 Share Posted August 19, 2006 run seems to do this to me sometimes and i do this $file = "C:\Program Files\HQuote\hquote.exe" if fileexists($file) then $nfile = filegetshortname($file) Run($nfile,"", @SW_SHOW) endif ****** not tested 8) Link to comment Share on other sites More sharing options...
The Brad Posted August 19, 2006 Author Share Posted August 19, 2006 run seems to do this to me sometimes and i do this$file = "C:\Program Files\HQuote\hquote.exe"if fileexists($file) then$nfile = filegetshortname($file)Run($nfile,"", @SW_SHOW)endif****** not tested8)I just tried your suggestion (thank you, by the way) and it's strange. The if loop executes (I know b/c I inserted some other commands inside the loop), which should mean the file exists, but the .exe still didn't run... Link to comment Share on other sites More sharing options...
Valuater Posted August 19, 2006 Share Posted August 19, 2006 I just tried your suggestion (thank you, by the way) and it's strange. The if loop executes (I know b/c I inserted some other commands inside the loop), which should mean the file exists, but the .exe still didn't run...maybe its looking for some file in its directory... try thisRun($nfile, "C:\Program Files\HQuote\", @SW_SHOW)8) Link to comment Share on other sites More sharing options...
Helge Posted August 19, 2006 Share Posted August 19, 2006 (edited) I've had problems like this before as well. Try setting the "workingdir"-parameter to the same folder as the program-file is located in. That solved my problem at least.. Run("C:\Program Files\HQuote\hquote.exe", "C:\Program Files\HQuote\") Edit :crap Edited August 19, 2006 by Helge Link to comment Share on other sites More sharing options...
The Brad Posted August 19, 2006 Author Share Posted August 19, 2006 Works! Thank you! Link to comment Share on other sites More sharing options...
Valuater Posted August 19, 2006 Share Posted August 19, 2006 Works! Thank you!Welcome8) 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