Run cmd as admin, by default

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

Question by:dshrenik

    Author Comment

    I mean is there a way to set it as default?
    LVL 3

    Expert Comment

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

    Accepted Solution

    Here is a screenshot to illustrate:
    LVL 3

    Expert Comment

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Using dates in 'DOS' batch files has always been tricky as it has no built in ways of extracting date information.  There are many tricks using string manipulation to pull out parts of the %date% variable or output of the date /t command but these r…
    YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT ( The crux of this batch f…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now