Have you ever tried to extract a file in the Program Files directory in Vista? You get all kinds permission denied errors, and generally be rejected. So how can we open up the zipfile as an administrator? How, you open a file as administrator?

There is an easy registry tweak that will let us identify the action to run as administrator for a file type. Unfortunately you will have to create the tweak manually, but we will walk you through it.

Manual Registry Tweak

Open regedit through the start menu search or run box and then browse down to the following key, substituting “.zip” for the file extension that you are looking for. (Note that the find dialog helps here)

HKEY_CLASSES_ROOT\.zip

Name:  1.jpg
Views: 908
Size:  18.6 KB

Now you desire to receive note of the Data value for the "(Default)" item. This tells you which application is registered to handle this file type, and where to go in the next register.

E.g. since the data field in this example says “WinRAR.ZIP” we will need to browse down to the following registry key.

HKEY_CLASSES_ROOT\WinRAR.ZIP\shell\open\command

What we want to do is copy the shell\open\command section to shell\runas\command. The simple method to do that is right-click on “command” and then selects Export.

Name:  2.jpg
Views: 939
Size:  17.5 KB

open up the exported registry file in Notepad and change “open” to “runas” where show below:

Name:  3.jpg
Views: 912
Size:  17.9 KB

Double-click on the file to enter the information into the registry. Now you will observe that the “runas” section is similar to the “open” section:

Name:  4.jpg
Views: 922
Size:  19.7 KB

And you can right-click on a file and open it as administrator:

Name:  5.png
Views: 480
Size:  12.0 KB

This example used WinRAR, but this should work for almost any filetype or application. You will just have to change where you view in the registry.