Sign in to follow this  
Followers 0
MerkurAlex

RunAs a bat file

5 posts in this topic

I have tried everything i can think of i have used

@comspec&" /c test.bat"

and variations but it refuses to work and yes my username and password is all correct it works on normal exe's


[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

make sure the workdir is set to a valid and accessible directory in your run statement!

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Run("CMD.exe /C TEST.bat");Close
Run("CMD.exe /K TEST.bat");Remain

This works, changing the workingdir to a valid path didn't.

I did only try it with the @COMSPEC macro though.

You could also just use, Run("TEST.bat")

Edited by Mobius

Share this post


Link to post
Share on other sites

Run("CMD.exe /C TEST.bat");Close
Run("CMD.exe /K TEST.bat");Remain

This works, changing the workingdir to a valid path didn't.

I did only try it with the @COMSPEC macro though.

You could also just use, Run("TEST.bat")

yea i know it works with run but runas wont run properly with a batch file.

[quote name='PsaltyDS' post='635433' date='Jan 27 2009, 07:04 AM']Larry is a mass murderer?! It's always the quiet, clean cut, bald guys... [/quote]

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  
Followers 0