Home > Windows Server Tips > > Open elevated command prompt from any folder in Windows Vista
Windows Server Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Open elevated command prompt from any folder in Windows Vista


Serdar Yegulalp, Contributor
05.24.2007
Rating: --- (out of 5)


Expert advice on Windows-based systems and hardware
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


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 Winhelponline.com 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 SearchWinComputing.com and SearchSQLServer.com.

More information on this topic:

  • Tip: Use RunAs to run Explorer window with elevated privileges in IE7
  • Topics: Windows Vista deployment
  • RSS: Sign up for our RSS feed to receive expert advice every day.

      Rate this Tip
      To rate tips, you must be a member of SearchWindowsServer.com.
      Register now to start rating these tips. Log in if you are already a member.




      Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



      RELATED RESOURCES
      2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
      Search Bitpipe.com for the latest white papers and business webcasts
      Whatis.com, the online computer dictionary

      DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Server Room Design - Planning, Cooling, Maintenance
HomeTopicsBlogsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2004 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts