Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Run cmd as admin, by default

Posted on 2011-10-19
4
Medium Priority
?
358 Views
Last Modified: 2012-05-12
Is it possible to run cmd with admin privileges without having to rught click and say "Run as amin"?

Thanks!
0
Comment
Question by:dshrenik
  • 3
4 Comments
 

Author Comment

by:dshrenik
ID: 36996189
I mean is there a way to set it as default?
0
 
LVL 3

Expert Comment

by:ajcheung78
ID: 36996213
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.
0
 
LVL 3

Accepted Solution

by:
ajcheung78 earned 2000 total points
ID: 36996241
Here is a screenshot to illustrate:
Example.png
0
 
LVL 3

Expert Comment

by:ajcheung78
ID: 36996285
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).
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question