nikink Posted January 30, 2007 Share Posted January 30, 2007 Hiya folks, I dunno if this is a bug or not, but ; This one doesn't work RunWait(@ComSpec & ' /c "' & @ProgramFilesDir & '\company\sub dir\program.exe" -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.comu >> "C:\info.txt"') ; This one works RunWait(@ComSpec & ' /c C:\Progra~1\company\subdir~1\program.exe -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.com >> "C:\info.txt"') so, yeah. The first example in my script looks good, but never worked and after using /k instead of /c I saw it was failing to read the double-quotes. So I had to resort to method 2 and eliminate all spaces in the path so that quotes weren't necessary - then it worked. If I manually type the command line with the double-quotes, it works. So, maybe this is a bug with 3.2.1.3? Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 Hiya folks, I dunno if this is a bug or not, but ; This one doesn't work RunWait(@ComSpec & ' /c "' & @ProgramFilesDir & '\company\sub dir\program.exe" -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.comu >> "C:\info.txt"') ; This one works RunWait(@ComSpec & ' /c C:\Progra~1\company\subdir~1\program.exe -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.com >> "C:\info.txt"') so, yeah. The first example in my script looks good, but never worked and after using /k instead of /c I saw it was failing to read the double-quotes. So I had to resort to method 2 and eliminate all spaces in the path so that quotes weren't necessary - then it worked. If I manually type the command line with the double-quotes, it works. So, maybe this is a bug with 3.2.1.3? that's not a bug in autoit. Run both of your commands in a DOS box and see what happens... __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
nikink Posted January 30, 2007 Author Share Posted January 30, 2007 If I run: "C:\Program Files\company\sub dir\program.exe" -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.com >> "C:\info.txt" from a dosbox, it works... What am I missing? Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 If I run:"C:\Program Files\company\sub dir\program.exe" -a "' & @ScriptDir & '\Activation.xml" -d proxy.url.com >> "C:\info.txt"from a dosbox, it works...What am I missing?see "help cmd" in a dos box. Search for /s and the way " is handled by cmd.exe if you give the option /c or /k. __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
nikink Posted January 30, 2007 Author Share Posted January 30, 2007 Ok... I'm reading that and getting quite lost. But I presume the important bit is where it says if there are more than exactly 2 "s on the cmdline, then things go wrong, and since mine has 6, I'm screwed... So, is there a way around this? It seems inelegant to use the ~1 abbreviations... Link to comment Share on other sites More sharing options...
/dev/null Posted January 30, 2007 Share Posted January 30, 2007 Ok... I'm reading that and getting quite lost. But I presume the important bit is where it says if there are more than exactly 2 "s on the cmdline, then things go wrong, and since mine has 6, I'm screwed...So, is there a way around this? It seems inelegant to use the ~1 abbreviations...yes, use " (double quotes) just for the executable and ' (single quotes) for the other parameters. That should work. Another option would be to use ShellExecute(). __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
nikink Posted January 31, 2007 Author Share Posted January 31, 2007 Alas, neither of those solutions appear to work. Oh well, thanks for the advice and help anyway! Link to comment Share on other sites More sharing options...
Shevilie Posted February 1, 2007 Share Posted February 1, 2007 It might be that your system will like to work with 8 chars folders.. (Got a old program which I have to use Progra~1 in top install or it fails... Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit 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