Run as Administrator for Any File Type - Windows 7 & Vista

Running Applications as Administrator in Windows 7/Vista
Have you encountered permission issues when attempting to extract files into the Program Files directory within Windows 7 or Vista? Often, these attempts result in numerous "permission denied" errors and ultimately fail. This article details a method to launch zip files, or any file type, with administrative privileges.
The Registry Tweak
A straightforward modification to the Windows Registry allows you to designate the "run as administrator" action for specific file types. While this requires a manual adjustment, the following steps will guide you through the process. It’s important to note that this technique was originally shared by jd2066, a valued member of our forum community.
First, open the Registry Editor (regedit) via the Start menu search or the Run dialog box. Then, navigate to the following registry key, remembering to substitute ".zip" with the file extension you wish to modify.
HKEY_CLASSES_ROOT\.zip
Within this key, carefully note the Data value associated with the "(Default)" item. This value indicates the application registered to handle the file type and also points to the next relevant registry location.
For instance, if the Data field displays "WinRAR.ZIP", proceed to the following registry key:
HKEY_CLASSES_ROOT\WinRAR.ZIP\shell\open\command
Copying the Command
To enable the "run as administrator" option, you need to duplicate the "shell\open\command" section to "shell\runas\command". A convenient method is to right-click on "command" and select "Export".

Open the exported registry file using Notepad. Within the file, replace all instances of "open" with "runas", as illustrated below:

Double-click the modified file to import the changes into the registry. This will create a "runas" section mirroring the "open" section:

Testing the Change
Now, when you right-click on a file of the modified type, you should see the option to "Run as administrator".

While this example utilizes WinRAR, the process is applicable to a wide range of file types and applications. Simply adjust the registry path accordingly.
Important Note: Modifying the registry can be risky. Always back up your registry before making any changes. Incorrect modifications can lead to system instability.





