ROBOTRONIC.DE

RunElevated.exe

RunElevated.exe: Allows execution of a command with elevated privileges.

If you're a techie, you know what this can do. If you're a noob, playing with this is like playing with matches. In a fireworks factory. Have a techie do it instead.

You can of course create a shortcut or a batch file with the command:

RunElevated.exe command

Examples

  1. Launch command prompt with elevated privileges.
    RunElevated.exe %windir%\system32\cmd.exe
  2. Command for a context menu entry in the Registry for folders, named "&Administrative command prompt here".
    C:\winnt\ThirdParty\RunAsRob\RunElevated\32\RunElevated.exe cmd.exe " /k cd %1"
    Registry entries for it:
    [HKEY_CLASSES_ROOT\Directory\shell\CmdHere]
    @="CMD &Prompt Here"
    
    [HKEY_CLASSES_ROOT\Directory\shell\CmdHere\command]
    @="cmd.exe \" /k cd %1\""
    
    [HKEY_CLASSES_ROOT\Directory\shell\CmdHereAsAdmin]
    @="CMD Prompt Here As Admin"
    
    [HKEY_CLASSES_ROOT\Directory\shell\CmdHereAsAdmin\command]
    @="C:\\winnt\\ThirdParty\\RunAsRob\\RunElevated\\32\\RunElevated.exe cmd.exe \" /k cd %1\""
              
  3. VBscript for a .vbs file that will add a " Command &Prompt here " context menu entry for folders for a user that doesn't have admin rights.
    VbDq = Chr(34)
    Set objWshShell = Wscript.CreateObject("Wscript.Shell")
    With objWshShell
      .RegWrite "HKEY_CURRENT_USER\Software\Classes\Directory\shell\CmdHere\", "Command &Prompt Here", "REG_SZ"
      .RegWrite "HKEY_CURRENT_USER\Software\Classes\Directory\shell\CmdHere\command\", _
                "cmd.exe /k cd " & VbDq & "%1\" & VbDq, "REG_SZ"
    End With
    MsgBox "Done."          
  4. Call command net.exe with elevated permissions to add an useraccount.
    RunElevated.exe NET USER username "password" /ADD