November, 2009

  • Explore as Administrator PowerToy

    Have you ever tried to use Windows Explorer to create a folder within or copy a file into a protected folder such a Program Files or Windows and had to deal with the confusing “File Operation” dialog box before you could complete your task.  This is one of the most confusing and poorly understood features of User Account Control.

    When running as a administrator with UAC enabled, your standard user token does not have write permissions to these protected folders.  Unfortunately, because Windows Explorer was not designed to run in multiple security contexts in the same desktop session, Windows cannot simply throw up a UAC prompt and then launch an elevated instance of Explorer.  Instead, you get one or more elevation prompts (if full-prompting is enabled) and Windows completes the operations using the full administrator token.  This can be annoying if you have to make repeated operations in these folders.

    So to work around this annoyance, I’ve created a new Explore as Administrator PowerToy.  Since this PowerToy cannot simply elevate Explorer, it requires that you install a third-party graphical file management program.  You can use almost any file management program you like as long as it will accept a folder path as a command line argument.  Let me illustrate what I mean by this with the program I like to use with the Explore as Administrator PowerToy, which is called Explorer++ (http://explorerplusplus.com/).  Download the Zip file for Explorer++.  (Grab the 32-bit or 64-bit version that matches the version of Windows that you are running.)  Extract the files, you’ll see that Explorer++ is a single executable file.  Open a command prompt in the folder where you extracted the files and run the following command:

    Explorer++.exe C:\Windows

    You will see that Explorer++.exe opened with the C:\Windows folder already selected.

    If you would like to try this PowerToy with Explorer++, place Explorer++.inf included in the attachment for this post into the folder with the Explorer++ extracted files.  The right click on Explorer++.inf and select Install.  This will install Explorer++ into a \Program Files\Explorer++ folder and add an Explorer++ program group to the Start Menu.

    You can then right click on the ExploreAsAdmin.inf also included in the attachment for this post and select Install.  Once the PowerToy is installed, you will see an Explore as Administrator option when right clicking on drives and folders in Windows Explorer.  When you select this option it will start Explorer++ elevated focused on the selected drive or folder.

    If you would like to use this PowerToy with another file management program, simply install that program and find the full path to the executable file. Then edit ExploreAsAdmin.inf and replace both instances of the following path with the path to the desired executable:

    %ProgramFiles%\Explorer++\Explorer++.exe

    Then install the modifed ExploreAsAdmin.inf.

    Important Note: For this PowerToy to work, the Elevate Command PowerToy from here must also be installed.

     

    - Michael Murgolo, Senior Consultant, Microsoft Services, U.S. East Region.

    Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

  • Welcome to the Elevation PowerToys Blog

    A while back I wrote two articles for TechNet Magazine describing a set of tools to work around a number of shortcomings when trying to elevate some types of tasks in Windows Vista and higher with User Account Control enabled.  You can find these articles here:

    Utility Spotlight: Script Elevation PowerToys for Windows Vista
    http://technet.microsoft.com/en-us/magazine/2007.06.utilityspotlight.aspx

    New Elevation PowerToys for Windows Vista
    http://technet.microsoft.com/en-us/magazine/2008.06.elevation.aspx

    Since then I have been working on several Elevation PowerToys but have not had the time to sit down and create another large article and tools download.  My experience with blogging on the Deployment Guys blog made me realize that the best way to get these new tools to you would be to create a new blog where I could write about and host the new Elevation PowerToys.  It would allow me break up the work by posting about one tool at a time and take feedback on them as well.

    So welcome to the blog and I hope you find the content to come useful and enlightening.

    - Michael Murgolo, Senior Consultant, Microsoft Services, U.S. East Region.

    Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.