Jump to content

RunAs a bat file


Recommended Posts

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]

Link to comment
Share on other sites

  • Developers

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

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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")

Edited by Mobius

wtfpl-badge-1.png

Link to comment
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]

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