+ Reply to Thread
Results 1 to 1 of 1

Thread: Add “Run as Administrator” option to the context menu of any file type

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    29

    Default Add “Run as Administrator” option to the context menu of any file type



    How to add Run as Administrator option to the context menu of any file type in Windows Vista?



    Run as Administrator option elevates your level to an administrator and thus you do not need several permissions to accomplish some tasks such as extracting the contents of a zip file to the Program Files folder. This option is already present in the context menu of various applications such as Command Prompt, Notepad and so on. This tutorial will help you in adding the “Run as Administrator” option to any file type.

    You can accomplish this in the following manner:

    1) Open Registry Editor and navigate to the key branch

    HKEY_CLASSES_ROOT \ .(file_type) in the left pane

    Note: Replace .(file_type) with type of file for which you want to add Run as Administrator option to the context menu to. For e.g. if you want to add this option to the context menu of .zip file so navigate to HKEY_CLASSES_ROOT \ .zip



    Figure 1


    2) Now note the value of the Default key value in the right pane. This value will tell you which program is assigned to handle that file type. Here WinRAR.ZIP is assigned. This will also help you in deciding the path of the next key where we have to proceed

    3) Now navigate to the key

    HKEY_CLASSES_ROOT \ WinRAR.ZIP \ shell \ open \ command in the left pane

    Note: You must replace the WinRAR.ZIP with your key determined in the above step. This is for example purpose only.



    Figure 2


    4) Now right click on the on the command key and choose Export and save the key on the Desktop as .reg file

    5) Now open the .reg file with the Notepad



    Figure 3


    6) Replace the open word with runas in the line [HKEY_CLASSES_ROOT\WinRAR\shell\runas\command] and save the changes



    Figure 4


    7) Now double click the .reg file

    8) Click Continue button if prompted by UAC

    9) Click Yes button to confirm



    Figure 5


    10) Click OK when successful



    Figure 6


    11) This creates an entry in Registry Editor as HKEY_CLASSES_ROOT \ WinRAR.ZIP \ shell \ runas \ command in the left pane



    Figure 7


    12) The process is complete you can now right click the desired file type and will notice the Run as Administrator option there.



    Figure 8


    More Vista articles


    Last edited by anakin; 07-10-2009 at 10:28 AM.

+ Reply to Thread

Similar Threads

  1. Replies: 0
    Last Post: 11-04-2008, 09:39 AM
  2. Replies: 0
    Last Post: 11-03-2008, 10:01 AM
  3. File Names and File Objects
    By developer in forum Programming
    Replies: 0
    Last Post: 11-03-2008, 09:46 AM
  4. Process Context and Interrupt Context
    By virus in forum Operating systems
    Replies: 0
    Last Post: 10-07-2008, 11:09 AM
  5. How to Reset the Windows Administrator Password in case of Forgotten
    By gopalakrishna in forum Operating systems
    Replies: 0
    Last Post: 08-16-2008, 05:04 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

LinkBacks Enabled by vBSEO