Jump to content

Using Run with Arguments shell extension with "as Admin"


Recommended Posts

I have used various versions of Kel's UberPack for several years.  One of its features I have enjoyed most is "Run with Arguments" in the context menu.


There are several registry entries for RunARG. One example is:

Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\batfile\shell\Run With Arguments][HKEY_CLASSES_ROOT\batfile\shell\Run With Arguments\command]@="\"C:\\Windows\\system32\\RunArg.exe\" %1" 

What I'd like to do is create a shell extension to "Run with Arguments (as Admin or Elevated)"


I found the following command-line.

runas /user:REQUIREDUSERNAME /savecred C:\Windows\System32\RunARG.exe

I guess /savecred is supposed to make it ask for admin password on the first run only.

  1. Does anyone know how this might be used to edit the context menu item so it can be run with elevated privileges?
  2. Does anyone know if that command-line will work using the %USERNAME% variable?

I considered checking the Run as Administrator box in the executable's Compatibility properties, but then I'd be nagged by UAC every time I use RunARG.  Using runas with /savecred would be most unobtrusive, if it can be made to work in the context menu. 


(I don't currently have any virtual machines to try this out on, so I just figured I'd put the question to the group.)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...