Jump to content
Sign in to follow this  
Keithdib

Command line syntax help

Recommended Posts

Keithdib

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
stormbreaker

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
Keithdib

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
Keithdib

Hi

I have done the task a different way, not in AutoIT

Thanks for help HKISH

Share this post


Link to post
Share on other sites
stormbreaker

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
Keithdib

Well I miss spelt your name, sorry...

i can understand your script... and its wrong lol

Share this post


Link to post
Share on other sites
stormbreaker

: 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  

×