Walker News

A capsule of walker’s experience in life…

Windows Vista Open Command Prompt Here With Elevated Privilege

Unlike Windows XP, Windows Vista built-in an easy but imperfect option to open command prompt window at a specific folder path - just press the SHIFT key while right-click a folder or drive and click the “Open Command Window Here” option in the pop-up context menu!

It’s imperfect, as the Windows Vista UAC will run this command prompt window as a standard user process. Having say that, you can’t use it to execute a command or perform an action that required administrator privilege!

While Windows Vista UAC is turned on (by default), all user-trigger command / program /action will run as a standard user process. That’s means you won’t able to execute a command or perform an action that access or require administrator privilege, even if you’re currently logon as Administrator!

User Account Control is the promise of Windows Vista security! But, you may take time to get used with it, as you’ll regularly prompted to acknowledge an action that required administrator privilege, no matter you’re logon with a user account of Vista Administrator group!

But, I insist to turn on UAC on my my Vista Ultimate, for the security concerns and the price of Windows Vista! After all, I’m getting used to it as days go on!

How to tell if the Vista Command Prompt is elevated with Administrator privilege?

The “Administrator:” keyword will appears in Windows Vista Command Prompt window caption bar, as shown in this diagram

How to tell if a Vista Command Prompt is running with elevated privilege? Notice that the Administrator keyword will appears in the Windows Vista Command Prompt caption bar to indicate it is running as an administrator process or with elevated privilege.

So, how to permanently open Windows Vista Command Prompt window with elevated privilege?

Here are two options (I prefer the the first Vista Trick - Elevated Vista Command Prompt shortcut in Windows Context menu):

A) How to enable Windows Vista “Open Command Window Here” with elevated privilege?

1) Click the Vista Start button, type regedit and press ENTER to bring up Windows Vista Registry editor.

2) Locate to this Registry path

HKEY_CLASSES_ROOT\Directory\shell

3) Create a new key that named as runas

4) Create a string value, named it as (Default), and key in a meaningful description (which will appears as an option in context menu). For my case, I enter “Open Administrator Command Window Here”

5) Right-click Runas registry key, select New follow by Key to create another new key and named it as Command

6) Create a new string value for Command key, named it as (Default), and enter this string value

cmd.exe /k "pushd %L && title Elevated Command Prompt Window"

7) Locate to this Registry path

HKEY_CLASSES_ROOT\Drive\shell

and repeat step 3 to step 6 again. Close the Windows Registry editor after completing all the steps!

Now, right-click on a folder or drive, click the new “Open Administrator Command Window Here” option in the pop-up context menu, which will open Windows Vista command prompt at the specific folder (the folder being right-click) with elevated privilege!

Right-click on a folder or drive, click the new Open Administrator Command Window Here option in the pop-up context menu, which will open Windows Vista command prompt at the specific folder - the folder being right-click - with elevated privilege! This is the most convenient and efficient way of using Vista Command Prompt options - compiling my C#, C, or Java source codes in command line has never been such easier!


This is the most convenient and efficient way of using Vista Command Prompt options - compiling my C#, C, or Java source codes in command line has never been such easier!

In case you can’t follow my poor instructions at above, or you’re not comfortable to edit the Windows Registry, you copy these block of Windows Registry script to Notepad, save it as a Windows Registry file (i.e. end with .Reg file extension), and double-click it to execute:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Runas]
@="Open Administrator Command Window Here"

[HKEY_CLASSES_ROOT\Directory\shell\Runas\Command]
@="cmd.exe /k \"pushd %L && title Elevated Command Prompt Window\""

[HKEY_CLASSES_ROOT\Drive\shell\Runas]
@="Open Administrator Command Window Here"

[HKEY_CLASSES_ROOT\Drive\shell\Runas\Command]
@="cmd.exe /k \"pushd %L && title Elevated Command Prompt Window\""

B) Create a Command Prompt shortcut and turn on “Run As Administrator” feature

1) Locate the Command Prompt in Vista Start menu. Click the Vista Start button and type cmd in the Start Search text box - the Command Prompt program (cmd) will appears in the program list.

2) Create a shortcut of Command Prompt - Right-click the Command Prompt (cmd) and drag it to Vista Desktop or Quick Launch toolbar, release the right-click and select Create Shortcuts Here option in the pop-up context menu.

[CAUTION] Execute this step with care - Don’t click the “Move Here” option as it will move the cmd program out from its default location in %windir%\system32.

3) Right-click the shortcut created in step 2 and select the Properties option

4) Click the Shortcut tab follow by Advanced… button

5) Tick the check-box labelled as “Run As Administrator”.

Create a Vista Command Prompt shortcut with elevated privilege or administrator privilege.

6) Click OK all the way to close all open dialog boxes. From now onwards, whenever you click this new Command Prompt shortcut will trigger Windows UAC asking for your permission to continue. Just press Continue to proceed running the Vista Command Prompt as administrator process, i.e elevated with administrator privilege!

Bookmark and Share:
  • Facebook
  • StumbleUpon
  • Sphinn
  • Digg
  • Pownce
  • del.icio.us
  • Live
  • Google
  • YahooMyWeb
  • Slashdot
  • Furl
  • NewsVine
  • Reddit
  • Ma.gnolia
  • TailRank
  • Technorati
  • BlinkList
  • blogmarks
  • IndianPad
  • Haohao
Topic - Howto, Windows Vista   Search - , , , , , , ,

Similar Articles:
» How To Add More Shortcut To Windows Vista Sendto Menu
» How To Maximize Windows Vista Command Prompt Window
» Why Adding Wordpad Shortcut In Sendto Menu
» Fire Windows Vista Command Prompt With Administrator Privilege
» Add Copy To Or Move To Context Menu In Vista
» How To Relocate IE7 Feed Folder In Windows Vista
» Relocate IE7 Favorite Folder Hack

Custom Search

Latest Posts @ WalkerNews.net

↑ Grab this Headline Animator

Navigation:
» HOME - WalkerNews.net
« PREV  - New Windows Vista Interface In Classy Black
» NEXT  - How To Relocate IE7 Feed Folder In Windows Vista

8 Comments so far

  1. WalkerNews.net

    [...] you’re using Windows Vista, you may interested on how to create shortcut of an elevated-privilege Command Prompt in the Quick Launch toolbar [...]

  2. WalkerNews.net

    [...] Skip this step if it’s already done ] Create an elevated privilege Command Prompt shortcut in Quick Launch toolbar, [...]

  3. WalkerNews.net

    [...] randomly select a port number (say 9999) and type netstat -ant | find “9999″ in an elevated privilege Vista Command Prompt window. The command will show empty output if the TCP port is free or [...]

  4. WalkerNews.net

    [...] To create or write an ISO image of a Windows folder or CD/DVD-ROM, use the Windows right-click Context menu. [...]

  5. mokhet December 31st, 2007 5:17 am
    WalkerNews.net

    great., just perfect to increase the speed to make command line compilation of my PSP homebrew.

    Thanks.

  6. jlogan January 11th, 2008 1:23 am
    WalkerNews.net

    thank you so much for this info.
    i was trying to do mklink for about half hour
    i had a sole account which was of type administrator, and still had permission issues…

  7. Sam March 7th, 2008 2:41 pm
    WalkerNews.net

    Thank you for posting the admin window tips. Great job!

  8. WalkerNews.net

    [...] Well, it’s not because of Firefox, but this is likely due to Windows Vista UAC security feature! I’ve successfully save the change by using Notepad++ that was executed in an elevated Command Prompt window! [...]

Appreciate your comments, but please be in topic.
Please use proper English with punctuation, from 12th of May 2008 onwards.
WalkerNews.net supports Gravatar (Web ID)