New
#1
Add PsExec to Windows 10 Context Menu
Hello,
I can run the command prompt as admin from the context menu. Is it possible to run the command prompt as SYSTEM from the context menu? I currently use PsExec from the Systernal Suite to run CMD as SYSTEM but I have not figured out a way to add that to the context menu that keeps the CMD open.
I haven't found a working solution anywhere.
I have created a desktop shortcut usingas the target. It works. Just have run as admin.Code:C:\Windows\System32\PsExec.exe -s -i -d -w %HOMEDRIVE% -high %windir%\system32\cmd.exe /k
This what I have in the registry so far:
The same is added to:Code:[HKEY_CLASSES_ROOT\LibraryFolder\Shell\OpenSysCmd]@="Command Prompt (Sys)""NoWorkingDirectory"="""NeverDefault"="""Icon"="imageres.dll,-5324"[HKEY_CLASSES_ROOT\LibraryFolder\Shell\OpenSysCmd\command]@="\"C:\\Windows\\System32\\PsExec.exe\" -s -i -d -w %HOMEDRIVE% -high %windir%\\system32\\cmd.exe /k\""
HKEY_CLASSES_ROOT\Drive\shell\
HKEY_CLASSES_ROOT\Directory\shell\
HKEY_CLASSES_ROOT\Directory\background\shell\
It adds the menu item.
Like I said... it works but it doesn't keep the window open. A quick flash and the windows closes.
Thanks