Jump to content

I'm Noobin'...can't Get Runwait() To Work With Arguments


Recommended Posts

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. :think:

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

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. :think:

Hi,

maybe have a look at $cmdLine[..]

Hope that helps.

EDIT: Oh, sorry. I think, I understood you wrong.

So long,

Mega

Edited 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

Same result with both of the above command lines. It's not seeing any of the arguements

is 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

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)

NEWHeader1.png

Link to comment
Share on other sites

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

:( 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. :think:

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...