Jump to content

Multiple runas reg entries still possible?


Zoinkity

Recommended Posts

I know in Vista you could get away with having multiple shell entries named "runas" so long as they were sequentially-numbered; i.e.: runas(2), runas(3), etc.

However, when trying to merge this reg entry from Vista the runas(2) is ignored:

[HKEY_CLASSES_ROOT\dllfile\shell\RunAs]
@="&Uninstall"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\dllfile\shell\RunAs\command]
@="regsvr32 /u \"%1\""

[HKEY_CLASSES_ROOT\dllfile\shell\RunAs(2)]
@="&Install"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\dllfile\shell\RunAs(2)\command]
@="regsvr32 \"%1\""

So, is there some other method to it, or is a workaround required?

Link to comment
Share on other sites


I also know that you can only add 1 RunAs entry, that why I use NirCmd:

http://www.nirsoft.net/utils/nircmd.html

I'm adding entries this way:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Open Solution elevated]
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\VisualStudio.Launcher.sln\Shell\Open Solution elevated\Command]
@="\"C:\\Windows\\nircmd.exe\" elevate \"C:\\Program Files (x86)\\Common Files\\Microsoft Shared\\MSEnv\\VSLauncher.exe\" \"%1\""

HasLUAShield adds the UAC shield icon and nircmd.exe elevate let me run with elevated rights. My example shows how to open Visual Studio Solution files (sln) as admin. Because sometime is might be useful to open a project with admin rights.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...