Keithdib Posted May 2, 2013 Posted May 2, 2013 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
stormbreaker Posted May 2, 2013 Posted May 2, 2013 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
Keithdib Posted May 2, 2013 Author Posted May 2, 2013 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
Keithdib Posted May 2, 2013 Author Posted May 2, 2013 Hi I have done the task a different way, not in AutoIT Thanks for help HKISH
stormbreaker Posted May 3, 2013 Posted May 3, 2013 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
Keithdib Posted May 3, 2013 Author Posted May 3, 2013 Well I miss spelt your name, sorry... i can understand your script... and its wrong lol
stormbreaker Posted May 4, 2013 Posted May 4, 2013 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') 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
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