Link to home
Start Free TrialLog in
Avatar of dshrenik
dshrenikFlag for United States of America

asked on

Run cmd as admin, by default

Is it possible to run cmd with admin privileges without having to rught click and say "Run as amin"?

Thanks!
Avatar of dshrenik
dshrenik
Flag of United States of America image

ASKER

I mean is there a way to set it as default?
I am assuming you are doing this to run something during a batch process.  One way to do this would be to change the shortcut by right clicking on the short cut and then from the shortcut tab click on the Advanced button and then from the Advanced Properties dialog select the Run as administrator option.
ASKER CERTIFIED SOLUTION
Avatar of ajcheung78
ajcheung78
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
So if you mean to run the cmd prompt as an admin then just right click on the command prompt shortcut and change the advanced settings to run as administrator as illustrated above.

If instead you mean to run a specific command in a batch file as an administrator then you can use some command line tools to do this securely - otherwise you can pipe in a password (although this is not secure).