Jump to content
Sign in to follow this  
Keithdib

Command line syntax help

Recommended Posts

Hi

I am trying to create either a RunAS or RunAsWait to run a command line

I cope an exe file to the local machine, then run it using the following command line,

printer.exe delete "*" "\\TREE\*"

I cannot get the syntax to work in AutoIT though, can anyone help?

Cheers

Share this post


Link to post
Share on other sites

o:) Enclose the command within single quotes ('<your command here>').

Local $USERNAME, $DOMAIN, $PWD
RunAs($USERNAME, $DOMAIN, $PWD, 0, 'printer.exe delete "*" "\\TREE\*"')

----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites

Hi

This does execute [well the autoIT wrapper does] on the machine but the {printer.exe delete "*" "TREE*"} does not run, if I copy that same command to the run or into a dos box it executes fine

Share this post


Link to post
Share on other sites

Thanks for help HKISH

Run this and you will see what I wanna say (or you could just understand it?):

msgbox(16, 'Error', 'The name is ' & StringReplace('HKISH', 'H', 'M') & 'not HKISH')

Have a good time ahead...


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
Share on other sites

: I know that, it will display MKISM, another mis-spelling... but this time, on my part.

msgbox(16, 'Error', 'The name is ' & StringReplace('HKISH', 'H', 'M', 1) & 'not HKISH')

:sweating: Good that it works fine now...


----------------------------------------

:bye: Hey there, was I helpful?

----------------------------------------

My Current OS: Win8 PRO (64-bit); Current AutoIt Version: v3.3.8.1

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...