"Run as TrustedInstaller" from Context menu

Discussion in 'Scripting' started by freddie-o, Dec 3, 2019.

  1. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    #41 inTerActionVRI, May 2, 2022
    Last edited: May 2, 2022
    In addition to checking the value to know if it is disabled, you also have to check the presence of the key to find out if the component has been uninstalled.
    So... It need to be:
    Code:
               reg.exe query "HKLM\SYSTEM\CurrentControlSet\Services\BITS" >nul 2>&1 && (
                   reg.exe query "HKLM\SYSTEM\CurrentControlSet\Services\BITS" | find /i " Start" | find /i "0x4" >nul && (
                       start "Downloading !DownloadFileName! file..." /wait /B PowerShell.exe -NoP -C "(New-Object System.Net.WebClient).DownloadFile('!DownloadURI!', '%ROOT%\!DownloadFileName!')"
                   ) || (
                       :: Preserves Remote Time File Stamp
                       start "Downloading !DownloadFileName! file..." /wait /B PowerShell.exe -NoP -C Start-BitsTransfer -Source "!DownloadURI!" -Destination "%ROOT%\!DownloadFileName!"
                   )
               ) || (
                   start "Downloading !DownloadFileName! file..." /wait /B PowerShell.exe -NoP -C "(New-Object System.Net.WebClient).DownloadFile('!DownloadURI!', '%ROOT%\!DownloadFileName!')"
               )
    
    I learned a lot in these details, I checked here the information obtained by the "sc.exe query" command and it really does not bring the right information for disabled services and the services standing in manual or automatic mode.

    find /i " Start" or findstr /i /c:" Start"
    Nneed to be with that space before Start. Otherwise you find DelayedAutostart too.

    Thanks, @Dark Dinosaur!
    Cheers!
     
  2. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    #42 freddie-o, May 3, 2022
    Last edited: May 3, 2022
    (OP)

    Thanks. I'll keep it simple and just stick with this script (corrected in the OP)
    https://forums.mydigitallife.net/th...r-from-context-menu.80713/page-2#post-1733337
     
  3. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    #43 inTerActionVRI, May 3, 2022
    Last edited: May 3, 2022
    What a crap... My mistake...
    The correct is:
    del /q /f

    /f Force
    /q Silent Mode
    /s Delete specified files from all subdireories.

    Sorry.
    Glad you put it correctly in the main post.

    But you did not put the WorkingDir fix, which avoids that problem you gave before adding "cd /d %~dp0" to the script that imports your *.reg files.

    from:
    Code:
    reg add "HKCR\*\shell\Run as TrustedInstaller\command" /v "" /t REG_SZ /d "PowerRun.exe \"%%1\"" /f >NUL
    
    to:
    Code:
    reg.exe add "HKCR\*\shell\Run as TrustedInstaller\command" /v "" /t REG_EXPAND_SZ /d "cmd.exe /X /D /U /R for %%%%# in (\"%%1\") do PowerRun.exe /WD:\"%%%%~dp#\" \"%%1\"" /f >nul 2>&1
    
     
  4. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    #44 freddie-o, May 4, 2022
    Last edited: May 4, 2022
    (OP)
    Thanks missed that updated the OP
     
  5. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    #45 inTerActionVRI, Jun 23, 2022
    Last edited: Jun 23, 2022
    Hey, man!

    @freddie-o,

    I managed to fix Native "Run As Administrator" for BAT and CMD script files.

    Code:
        rem Fix Native "Run As Administrator" for BAT and CMD script files.
        reg.exe add "HKCR\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R \"for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)\"" /f >nul 2>&1
        reg.exe add "HKCR\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R \"for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)\"" /f >nul 2>&1
        reg.exe add "HKLM\SOFTWARE\Classes\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R \"for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)\"" /f >nul 2>&1
        reg.exe add "HKLM\SOFTWARE\Classes\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R \"for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)\"" /f >nul 2>&1
    

    NOTE: This code was broken after conversion with "RegConvert_v1.2". It will remain here in a didactic way for comparison with the manualy corrected code posted below.
     
  6. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    #46 freddie-o, Jun 23, 2022
    Last edited: Jun 23, 2022
    (OP)
    Did you test it :confused: :D

    First I got this
    Untitled.png

    Then it broke "Run as administrator"

    Not that I need it... I am always the Administrator :rolleyes:
    I just merged back the exported batfile and cmdfile keys
     
  7. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    #47 inTerActionVRI, Jun 23, 2022
    Last edited: Jun 23, 2022
    Yes it is working here.
    UAC enabled here.

    And working with your testing script.


    In conversion with "RegConvert_v1.2" something broke.
    Code:
        reg.exe add "HKCR\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
        reg.exe add "HKCR\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
        reg.exe add "HKLM\SOFTWARE\Classes\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
        reg.exe add "HKLM\SOFTWARE\Classes\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd.exe\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    
    Compare with what I sent before.

    Folow de registry entries.
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    
    
    And direct in regedit value:
    Code:
    "%SystemROOT%\System32\cmd.exe" /X /R for %%# in ("%1") do (PushD "%%~dp#" && Start "%%~nx#" /I "%%~f#" %*)
    
    @Dark Dinosaur, the fix of the fix, hehehehe

    Sorry for the inconvenience, hehehehe
     
  8. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,701
    5,104
    120
    lost you ... short memory o_O
    what do you talking about ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    #49 freddie-o, Jun 23, 2022
    Last edited: Jan 5, 2024
    (OP)
    "Run as administrator" FIX

    Added "cpl" "exe" "msc"
    OP: https://forums.mydigitallife.net/th...r-from-context-menu.80713/page-3#post-1741952



    Run as administrator FIX.cmd
    Code:
    @echo off
    
    reg delete "HKCR\batfile\shell\runas\command" /f 2>nul
    reg delete "HKCR\cmdfile\shell\runas\command" /f 2>nul
    reg delete "HKCR\cplfile\shell\runas\command" /f 2>nul
    reg delete "HKCR\exefile\shell\runas\command" /f 2>nul
    reg delete "HKCR\mscfile\shell\runas\command" /f 2>nul
    reg delete "HKLM\SOFTWARE\Classes\batfile\shell\runas\command" /f 2>nul
    reg delete "HKLM\SOFTWARE\Classes\cmdfile\shell\runas\command" /f 2>nul
    reg delete "HKLM\SOFTWARE\Classes\cplfile\shell\runas\command" /f 2>nul
    reg delete "HKLM\SOFTWARE\Classes\exefile\shell\runas\command" /f 2>nul
    reg delete "HKLM\SOFTWARE\Classes\mscfile\shell\runas\command" /f 2>nul
    
    reg add "HKCR\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKCR\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKCR\cplfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKCR\exefile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKCR\mscfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKLM\SOFTWARE\Classes\batfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKLM\SOFTWARE\Classes\cmdfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKLM\SOFTWARE\Classes\cplfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKLM\SOFTWARE\Classes\exefile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    reg add "HKLM\SOFTWARE\Classes\mscfile\shell\runas\command" /ve /t REG_EXPAND_SZ /d "\"%%SystemROOT%%\System32\cmd\" /X /R for %%%%# in (\"%%1\") do (PushD \"%%%%~dp#\" && Start \"%%%%~nx#\" /I \"%%%%~f#\" %%*)" /f >nul 2>&1
    
    pause
    



    Run as administrator FIX.reg
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cplfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mscfile\shell\RunAs\command]
    
    [HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cplfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mscfile\shell\RunAs\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
      




     
  10. inTerActionVRI

    inTerActionVRI MDL Expert

    Sep 23, 2009
    1,626
    3,361
    60
    You liked my post.
    Then I called because I thought you had used the script that was broken.
    So you could use the corrected code there.
     
  11. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    Added to the OP
     
  12. Dark Dinosaur

    Dark Dinosaur X Æ A-12

    Feb 2, 2011
    3,701
    5,104
    120
    #52 Dark Dinosaur, Jun 23, 2022
    Last edited: Jun 24, 2022
    end up building something else
    ( not to step up someone else great work ..
    like to do things in a different way )
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\lnkfile\shell\RunAsTI]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorBefore"=""
    
    [HKEY_CLASSES_ROOT\lnkfile\shell\RunAsTI\command]
    @="c:\\windows\\NSudoLC.exe -U:T -P:E cmd /c start \"%1\""
    
    [HKEY_CLASSES_ROOT\lnkfile\shell\RunAsTI_x64]
    @="Run As TrustedInstaller x64"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorAfter"=""
    
    [HKEY_CLASSES_ROOT\lnkfile\shell\RunAsTI_x64\command]
    @="\"c:\\windows\\NSudoLC x64.exe\" -U:T -P:E cmd /c start \"%1\""
    
    [HKEY_CLASSES_ROOT\regfile\shell\RunAsTI]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorBefore"=""
    
    [HKEY_CLASSES_ROOT\regfile\shell\RunAsTI\command]
    @="c:\\windows\\NSudoLC.exe -U:T -P:E regedit.exe \"%1\""
    
    [HKEY_CLASSES_ROOT\regfile\shell\RunAsTI_x64]
    @="Run As TrustedInstaller x64"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorAfter"=""
    
    [HKEY_CLASSES_ROOT\regfile\shell\RunAsTI_x64\command]
    @="\"c:\\windows\\NSudoLC x64.exe\" -U:T -P:E regedit.exe \"%1\""
    
    [HKEY_CLASSES_ROOT\exefile\shell\RunAsTI]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorBefore"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\RunAsTI\command]
    @="c:\\windows\\NSudoLC.exe -U:T -P:E \"%1\""
    
    [HKEY_CLASSES_ROOT\exefile\shell\RunAsTI_x64]
    @="Run As TrustedInstaller x64"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorAfter"=""
    
    [HKEY_CLASSES_ROOT\exefile\shell\RunAsTI_x64\command]
    @="\"c:\\windows\\NSudoLC x64.exe\" -U:T -P:E \"%1\""
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\RunAsTI]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorBefore"=""
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\RunAsTI\command]
    @="c:\\windows\\NSudoLC.exe -U:T -P:E \"%1\""
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\RunAsTI_x64]
    @="Run As TrustedInstaller x64"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorAfter"=""
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\RunAsTI_x64\command]
    @="\"c:\\windows\\NSudoLC x64.exe\" -U:T -P:E \"%1\""
    
    [HKEY_CLASSES_ROOT\batfile\shell\RunAsTI]
    @="Run As TrustedInstaller"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorBefore"=""
    
    [HKEY_CLASSES_ROOT\batfile\shell\RunAsTI\command]
    @="c:\\windows\\NSudoLC.exe -U:T -P:E \"%1\""
    
    [HKEY_CLASSES_ROOT\batfile\shell\RunAsTI_x64]
    @="Run As TrustedInstaller x64"
    "HasLUAShield"=""
    "Position"="Bottom"
    "SeparatorAfter"=""
    
    [HKEY_CLASSES_ROOT\batfile\shell\RunAsTI_x64\command]
    @="\"c:\\windows\\NSudoLC x64.exe\" -U:T -P:E \"%1\""
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  13. HLP Mr. Lin Yu

    HLP Mr. Lin Yu MDL Junior Member

    Jul 22, 2022
    66
    30
    0
    Hello @freddie-o
    I used your Batch Script, but it only runs with System permissions instead of TrustedInstaller, what happened? And how to fix it?
    Windows version 22H2
     
  14. Owned67

    Owned67 MDL Novice

    Dec 9, 2009
    10
    2
    0
    Ive added but when execute a bat file or exe file, is not launched with admin privileges, as a single user seems...

    i.imgur.com/8SrOa86.png or i.imgur.com/ereWNZ8.png
     
  15. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60

    No problem on my end.
    Standard user

    batch1.png



    Run as administrator

    batch2.png




    Standard user

    exe1.png



    Run as administrator

    exe2.png



    This is my Registry
    run as administrator.png
     
  16. Owned67

    Owned67 MDL Novice

    Dec 9, 2009
    10
    2
    0
    ok thanks weird ;(

    possible to share you reg file?

    will import for see if something is wrong...

    thanks
     
  17. Owned67

    Owned67 MDL Novice

    Dec 9, 2009
    10
    2
    0
  18. freddie-o

    freddie-o MDL Expert

    Jul 29, 2009
    1,358
    2,267
    60
    #60 freddie-o, Jan 4, 2024
    Last edited: Jan 5, 2024
    (OP)
    Here's the REG file

    Run as administrator FIX.reg
    Code:
    Windows Registry Editor Version 5.00
    
    [-HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    [-HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cplfile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\runas\command]
    [-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mscfile\shell\RunAs\command]
    
    [HKEY_CLASSES_ROOT\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\cplfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\exefile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_CLASSES_ROOT\mscfile\shell\RunAs\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\batfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cmdfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\cplfile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\exefile\shell\runas\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00
    
    [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mscfile\shell\RunAs\command]
    @=hex(2):22,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,4f,00,4f,00,54,\
      00,25,00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,\
      6d,00,64,00,2e,00,65,00,78,00,65,00,22,00,20,00,2f,00,58,00,20,00,2f,00,52,\
      00,20,00,66,00,6f,00,72,00,20,00,25,00,25,00,23,00,20,00,69,00,6e,00,20,00,\
      28,00,22,00,25,00,31,00,22,00,29,00,20,00,64,00,6f,00,20,00,28,00,50,00,75,\
      00,73,00,68,00,44,00,20,00,22,00,25,00,25,00,7e,00,64,00,70,00,23,00,22,00,\
      20,00,26,00,26,00,20,00,53,00,74,00,61,00,72,00,74,00,20,00,22,00,25,00,25,\
      00,7e,00,6e,00,78,00,23,00,22,00,20,00,2f,00,49,00,20,00,22,00,25,00,25,00,\
      7e,00,66,00,23,00,22,00,20,00,25,00,2a,00,29,00,00,00