CygnusX1 Posted June 19, 2008 Share Posted June 19, 2008 Hello All, I have a script that I'm trying to call a .BAT file from Run("file_compare.bat", "c:\program files\program name\root dir") The help says to use a file name then the working directory, which is what I'm doing. I have downloaded the latest release of AutoIt For what it's worth, the .BAT runs ImageMagick and compares a directory full of images. I can get the .BAT file to run from the CMD window or double clicking on the file in the directory. Any ideas why this wouldn't be working? Thanks Cygnus Cygnus Link to comment Share on other sites More sharing options...
LongBowNZ Posted June 19, 2008 Share Posted June 19, 2008 I think you might need ShellExecute() with a .bat file. Link to comment Share on other sites More sharing options...
CygnusX1 Posted June 19, 2008 Author Share Posted June 19, 2008 Thank you, ShellExecute worked! ShellExecute("file_compare", "", "C:\Program Files\program name\root dir") Cygnus Cygnus Link to comment Share on other sites More sharing options...
PsaltyDS Posted June 19, 2008 Share Posted June 19, 2008 (edited) You may need to path out the executable: $sDir = "c:\program files\program name\root dir" $sFile = "file_compare.bat" Run($sDir & "\" & $sFile, $sDir, @SW_SHOW) Edit: Well that's what I get for not checking on replies already posted: Thank you, ShellExecute worked! ShellExecute("file_compare", "", "C:\Program Files\program name\root dir") Cygnus Edited June 19, 2008 by PsaltyDS 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...
LongBowNZ Posted June 19, 2008 Share Posted June 19, 2008 Edit: Well that's what I get for not checking on replies already posted:Happens to me all the time. 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