Problem solve Get help with specific problems with your technologies, process and projects.

Open elevated command prompt from any folder in Windows Vista

Here's how to add an administrator-level command-window prompt to the context menu of any folder in Windows Vista.

When a Windows Vista user shift-clicks on a folder in Explorer, the context menu option "Open Command Window Here" comes up. Clicking on it gives you a command prompt that's started in the desired folder—a handy way to quickly get a command prompt to a buried folder that has a long pathname.

The bad news is that the command prompt is only a regular-user prompt, not an elevated (administrative) command prompt. If you want to do anything that requires an admin-level login, you have to open it manually from the Start menu and drill down to the needed folder. This is a problem for me because some of my system's folders have Unicode pathnames, which I have trouble drilling down to from a command prompt.

Thankfully, the blog has published a way to add an admin-level command-window prompt to any folder's context menu. The simple process involves creating a REG file which you then merge into the Registry.

The blog offers two versions of this trick: one for adding an elevated prompt to a folder context menu, another for adding an elevated command prompt to the My Computer context menu. Both incarnations of the trick use the RunAs command as a context menu handler for a command prompt. RunAs does the actual elevation, since CMD itself doesn't have a switch for running an instance of itself in Admin mode.

Once you install the Registry patch, you should see an "Open Command Windows Here (Administrator)" option along with the User Account Control (UAC) "shield" icon in the right-click context menu for a folder (or Explorer, depending on which script you're using).

Note: If you use this trick, you'll still be prompted for a UAC confirmation whenever you invoke the admin command prompt from a context menu—assuming, of course, UAC is turned on.

About the author: Serdar Yegulalp is editor of the Windows Insight, (formerly the Windows Power Users Newsletter), a blog site devoted to hints, tips, tricks and news for users and administrators of Windows NT, Windows 2000, Windows XP, Windows Server 2003 and Vista. He has more than 12 years of Windows experience under his belt, and contributes regularly to and

More information on this topic:

Dig Deeper on Microsoft Hyper-V management

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.