Link to home
Start Free TrialLog in
Avatar of E=mc2
E=mc2Flag for Canada

asked on

Trigger a batch file to run in Administrator mode

What is the command line, within a batch, if possible, to start that batch in Administrator mode?
Or would another batch be needed to trigger this batch in Administrator?
Avatar of Wayne88
Wayne88
Flag of Canada image

I don't think that's possible but you can run the batch as scheduled task then set it to run with whichever user account you want.
SOLUTION
Avatar of Joe Winograd
Joe Winograd
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
within a batch, if possible, to start that batch in Administrator mode

I don't think it's possible

As I see it, you've got three options

1) The suggestion provided by Wayne88 -

2) The suggestion provided by Joe Winograd

3) Start > type cmd > Right click on Command Prompt and select "Run as Administrator" > enter path to your batch file
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial