Alasdair 0 Posted February 9, 2011 Dear All I have a program which has been running OK under Windows XP but I cannot see why I cannot get it to work under Windows 7 (64 bit) even after making what I thought were the necessary changes. Under XP the problem line $Result = RunWait("C:\Program Files\AutoIt3\Aut2Exe\Aut2exe.exe /in D:\Rotary\IT Officer\Distribution\CheckDownloads.au3 /out D:\Rotary\IT Officer\Distribution\CheckDownloads.exe", "SW_HIDE") I have changed it to:- $Result = RunWait("C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe /in D:\Rotary\IT Officer\Distribution\CheckDownloads.au3 /out D:\Rotary\IT Officer\Distribution\CheckDownloads.exe", "SW_HIDE") If @error Then MsgBox(0, "Building CheckDownloads", "Build failure "& $Result) Exit ;For testing EndIf This returns 0 in $Result AutoIt does not seem to like the syntax but I cannot find out why Can anybody advise: Alasdair Campbell Share this post Link to post Share on other sites
Jos 2,210 Posted February 9, 2011 I would expect that you need to put double quotes around the input and output files. Something like: $Result = RunWait('"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe" /in "D:\Rotary\IT Officer\Distribution\CheckDownloads.au3" /out "D:\Rotary\IT Officer\Distribution\CheckDownloads.exe"', "SW_HIDE") Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Share this post Link to post Share on other sites
AdamUL 98 Posted February 9, 2011 You seem to have a "quote", parameter, and Macro problems. Try for XP: $Result = RunWait('"C:\Program Files\AutoIt3\Aut2Exe\Aut2exe.exe" /in "D:\Rotary\IT Officer\Distribution\CheckDownloads.au3" /out "D:\Rotary\IT Officer\Distribution\CheckDownloads.exe"', "", @SW_HIDE) and for Win 7: $Result = RunWait('"C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe" /in "D:\Rotary\IT Officer\Distribution\CheckDownloads.au3" /out "D:\Rotary\IT Officer\Distribution\CheckDownloads.exe"', "", @SW_HIDE) Adam Share this post Link to post Share on other sites
GEOSoft 67 Posted February 9, 2011 Do some checking for FileExists("C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2exe.exe") Also check for FileExists(@ProgramFilesDir & "\AutoIt3\Aut2Exe\Aut2exe.exe") Try to use the built in macros when you can. GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!" Share this post Link to post Share on other sites