Home » Tutorials » Tips & Tricks » Add Run as Administrator Windows 7 or Vista

Add Run as Administrator Windows 7 or Vista

Run as Administrator

Run as Administrator: Have you ever tried to unzip a file to the Program Files directory in Windows 7 or Vista? You’ll get all sorts of permission denied errors, and generally be unsuccessful. So how do we open up the zipfile as an administrator? For that matter, how do you open any file as administrator? Run as Administrator

There’s a simple registry tweak that will let us specify the action to Run as Administrator for a file type. Unfortunately you’ll have to make the tweak manually, but we’ll walk you through it.

Note: The method explained here is courtesy of jd2066.

Run as Administrator

Manual Registry Tweak: Run as Administrator

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

image

Now you want to take note of the Data value for the “(Default)” item. This tells you which application is registered to handle this file type, and also where we need to go in the registry next.

For this example, since the data field in this example says “WinRAR.ZIP” we’ll need to browse down to the following registry key. (again, the find dialog helps here)

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 easiest way to do that is right-click on “command” and then choose Export.

image

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

image

Double-click on the file to enter the information into the registry. Now you’ll see that the “runas” section is identical to the “open” section:

image

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

image

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

Thanks to Howtogeek

About engrsajidrehman

I am an Electronics Engineer by profession and currently is a Service Engineer in European Based Textile Machinery Manufacturing Company. Beside all this I'm a Web Designer, Graphics Designer, Content writer. I love to explore places and new things. You can contact him on Google, Linkedin, and subscribe my YouTube Channel for cool stuff Thanks
x

Check Also

Add Encrypt Decrypt Options to Windows 7 / Vista

Add Encrypt Decrypt Options to Windows 7 / Vista

Encrypt Decrypt : If you use the built-in file encryption in Windows 7 or Vista, ...