fortypoundhead.com

How to Open an Elevated Command Prompt

Posted On 2014-02-12 by dwirch
Keywords:
Tags: Tutorial Tip Security Windows Windows 7 Windows 8
Views: 685


There is something of a mantra in the IT world: If it has to be repeated more than once, script it and automate it.  The same goes for Q&A.  If more than one person asks about it, write it down. So here you go.

Why do you need to open an elevated command prompt?  With newer Windows operating systems, certain files and functions are protected.  Even if your user account is in the local administrators group, you still won't be able to perform certain things on your computer.

For example, you may be testing network or internet enabled application, but you want the queries to go to specific server, like a dev/test copy of a database.  One simple way of doing this is modifying your hosts file at C:\Windows\System32\drivers\etc.  So you think, "No problemo!"

Not so fast, sparky.  If you simply open the file in notepad, or use my preferred method of opening a command prompt, you'll get either an access denied/save-as dialog (notepad method), or you'll get a The requested operation requires elevation at which point you'll be dumped back to the command prompt.

The good news is that it's really easy to open an elevated command prompt, and the process is the same in Windows 7 and Windows 8.

  1. Tap the Windows key on your keyboard to bring up the Start menu or Start screen.
  2. Type CMD, and the command prompt shortcut will bubble to the top.
  3. Right-click the shortcut, and select Run As Administrator from the context menu. 
  4. If you have UAC turned on, you'll get a dialog asking if you are sure. Select the affirmative, and your elevated command prompt will be displayed.

If you want to bypass this process, you can turn off User Account Control (UAC) completely.  I wouldn't recommend it, though; it's there for a reason.

 


About the Author

dwirch has posted a total of 172 articles.

 


Comments On This Post

No comments on this post yet!


Do you have a thought relating to this post? You can post your comment here. If you have an unrelated question, you can use the Q&A section to ask it.

Or you can drop a note to the administrators if you're not sure where you should post.


Your IP address is:23.20.157.174

Before you can post, you need to prove you are human. If you log in, this test goes away.


Beat With A Stick List Returns: By request, BWASL has returned to the site. Free your rage by telling the world about something that really grinds your gears. Add your beating.



Recent Forum Posts

BWASL returns
dwirch posted on May 13, 2017 at about 15:24 in Site News

BWASL returns
dwirch posted on May 13, 2017 at about 8:46 in Site News

Job Spammer: Balashankar Bose Bose
dwirch posted on May 11, 2017 at about 10:05 in Spammers

Job Spammer: Bharti Jigyasi
dwirch posted on May 11, 2017 at about 7:58 in Spammers

List of Shady Characters
dwirch posted on April 25, 2017 at about 16:39 in Webmaster Stuff

Job Spammer: Bilal Uddin
dwirch posted on April 25, 2017 at about 11:00 in Spammers