theguy0000 Posted September 18, 2007 Posted September 18, 2007 $AutoItDir = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") If @error Or Not FileExists ($AutoItDir&"\AutoIt3.exe") Then error("Could not locate AutoIt3.exe") $run = Run ($AutoItDir&'\AutoIt3.exe /ErrorStdOut "'&$newscriptpath&'"', Default, Default, 2) Func error ($str) ConsoleWrite ($str) Exit EndFunc Obviously there's more to the program than that, but that's the only significant part. And, $newscriptpath is "C:\temp\AuCGI\control.auw" I get "Unable to execute the external program. The directory name is invalid" for the Run line. What am I doing wrong? Oh and I know it's reading from the registry because otherwise it would Exit before it runs, which obviously isn't happening. the InstallDir key is C:\Program Files\AutoIt3 latest version 3.2.8.1, SyntaxCheck not catching anything. The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
MHz Posted September 18, 2007 Posted September 18, 2007 Protect the path with spaces by using double quotes and it may work for you. $AutoItDir = RegRead("HKLM\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") If @error Or Not FileExists ($AutoItDir&"\AutoIt3.exe") Then error("Could not locate AutoIt3.exe") $run = Run ('"' & $AutoItDir&'\AutoIt3.exe" /ErrorStdOut "' & $newscriptpath & '"', Default, Default, 2) Func error ($str) ConsoleWrite ($str) Exit EndFunc I am not sure about those Defaults, but that is something else as to your current issue.
Richard Robertson Posted September 18, 2007 Posted September 18, 2007 You may have to set the default directory to "".
theguy0000 Posted September 18, 2007 Author Posted September 18, 2007 Well, that got rid of the error...Had to do both. Still not working correctly, but that's a different problem, at least we have no more errors. Thanks! The cake is a lie.www.theguy0000.com is currentlyUP images.theguy0000.com is currentlyUP all other *.theguy0000.com sites are DOWN
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