Unlock For Us

How to Add “Run as Administrator” option to any file types in Windows 7 and Vista

RunAsAdminadded

This situation is rare but well known for .Net programmers and useful in every geek computing.

Using the newest version of WinBubble, adding the option to any file types context menu is very easy.

Adding “Run As Administrator” Right-Click Menu option

You don’t need to memorize or go back to this article in order to get the settings.

Open the application and go to Tools Tab.

  • Click the Hidden Secret Button located at the Right Side to enable “Search mode
  • Click the “Windows Explorer (All Files)” button to list all the Context menus saved in your registry.
  • Now you can see the Name and Command values as shown below.

runas

  • Copy to Clipboard the Command

cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F

  • Type the file type extension that you want to edit e.g. .sln file
  • Click the Open with option

addfiletypesln

Create new Context menu item by putting the values

Name   runas

Command   cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F

Finally, Click the Save Option.

That’s it!

You can do many things without digging your registry, using shell extension editor or writing your own program to add any option to your context menu.

Note: “Take the Ownership” of the file uses Runas to elevate the command to administrator privileges. If you added the option “Take the Ownership”, It will be disabled because Runas can only be used once.

Hope this helps!

0 Comments:

 

© UnlockForUs 2007-2012| Blogger| Google.com | License Agreement