Zoinkity Posted May 21, 2012 Posted May 21, 2012 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?
xpclient Posted May 21, 2012 Posted May 21, 2012 I tried this on Vista SP2. I am not getting any entries named runas(2) to run elevated. Only runas runs elevated.
MagicAndre1981 Posted May 21, 2012 Posted May 21, 2012 I also know that you can only add 1 RunAs entry, that why I use NirCmd:http://www.nirsoft.net/utils/nircmd.htmlI'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.
xpclient Posted May 22, 2012 Posted May 22, 2012 Yes I use nircmd elevate too along with HasLUAShield. E.g. nircmd elevate cmd /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F
Zoinkity Posted May 22, 2012 Author Posted May 22, 2012 Thanks! Works great, and solves a stack of other annoyances.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now