sshrum Posted April 17, 2006 Share Posted April 17, 2006 Argh...I checked the help file but could find anything about parameter/argument passing...Let's say I have a command that I want to call with arguments like this: abc.exe /i:%windir%\foo\bar /u:\\myserver\sms\blah.txt /quWhen I pass this as the command to RUNWAIT(), the command is executing as if it was only: abc.exeWhat do I need to do to get the arguments to pass with the command?TIABorn-again noob. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 17, 2006 Share Posted April 17, 2006 (edited) Argh...I checked the help file but could find anything about parameter/argument passing... Let's say I have a command that I want to call with arguments like this: abc.exe /i:%windir%\foo\bar /u:\\myserver\sms\blah.txt /qu When I pass this as the command to RUNWAIT(), the command is executing as if it was only: abc.exe What do I need to do to get the arguments to pass with the command? TIA Born-again noob. Hi, maybe have a look at $cmdLine[..] Hope that helps. EDIT: Oh, sorry. I think, I understood you wrong. So long, Mega Edited April 17, 2006 by th.meger Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
NTKBO Posted April 17, 2006 Share Posted April 17, 2006 Have you tried: RunWait("abc.exe" & " /i:%windir%\foo\bar" & " /u:\\myserver\sms\blah.txt /qu") Link to comment Share on other sites More sharing options...
GaryFrost Posted April 17, 2006 Share Posted April 17, 2006 RunWait("abc.exe" & " /i:" & @WindowsDir & "\foo\bar" & " /u:\\myserver\sms\blah.txt /qu") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
sshrum Posted April 17, 2006 Author Share Posted April 17, 2006 Same result with both of the above command lines. It's not seeing any of the arguements Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
GaryFrost Posted April 17, 2006 Share Posted April 17, 2006 Same result with both of the above command lines. It's not seeing any of the arguementsis abc.exe an autoit script, if it is you need to look at $CMDLine in the help file SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
sshrum Posted April 17, 2006 Author Share Posted April 17, 2006 No....abc.exe is not the script name. It is a program being called via RUNWAIT() ala: $iResult = runwait("abc.exe /i:%windir%\foo\bar /u:\\myserver\sms\blah.txt /qu", @SystemDir, @SW_HIDE) Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' Link to comment Share on other sites More sharing options...
Valuater Posted April 17, 2006 Share Posted April 17, 2006 1 try a message box Msgbox(0."", " /i:" & @WindowsDir & "\foo\bar" & " /u:\\myserver\sms\blah.txt /qu") to check the spacing.. etc 2 try this $File = FileGetShortName(" /i:" & @WindowsDir & "\foo\bar" & " /u:\\myserver\sms\blah.txt /qu") then RunWait("abc.exe" & $File ) 8) Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 17, 2006 Share Posted April 17, 2006 Hi, could you to it manually in a DOS box? Does that work? Then you could give this a try : RunWait(@ComSpec & " /c " & "commandName") . So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
sshrum Posted April 17, 2006 Author Share Posted April 17, 2006 Freakin network guys...the command line they sent me was wrong. Running the command line off the Windows RUN dialog produced the same results. Sorry to waste everyone's time...I knew something was up. I should know better then to trust their syntax. Lesson learned: ALWAY run the command first to make sure it works before beating your own head on table. Sean Shrum :: http://www.shrum.net All my published AU3-based apps and utilities 'Make it idiot-proof, and someone will make a better idiot' 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