Windows 10: Add PsExec to Windows 10 Context Menu Solved

Page 1 of 2 12 LastLast

  1. Posts : 11
    Windows 10 Enterprise S
       22 Oct 2017 #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 using
    Code:
    C:\Windows\System32\PsExec.exe -s -i -d -w %HOMEDRIVE% -high %windir%\system32\cmd.exe /k
    as the target. It works. Just have run as admin.

    This what I have in the registry so far:

    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\""
    The same is added to:
    HKEY_CLASSES_ROOT\Drive\shell\
    HKEY_CLASSES_ROOT\Directory\shell\
    HKEY_CLASSES_ROOT\Directory\background\shell\

    It adds the menu item.
    Click image for larger version. 

Name:	cap.fw.png 
Views:	32 
Size:	88.1 KB 
ID:	159651

    Like I said... it works but it doesn't keep the window open. A quick flash and the windows closes.

    Thanks
      My ComputerSystem Spec

  2.    22 Oct 2017 #2

    Hi, I'm reminded of what I did here for someone - maybe it will suggest an idea...
    Open Notepad as Administrator with Context Menu? Solved - Windows 10 Forums
    From #8
      My ComputerSystem Spec

  3.    22 Oct 2017 #3

    @MasTech

    You could add WinX Classic Context Menu to HKEY_CLASSES_ROOT/Directory:

    Add Win+X Classic Menu to Context Menu in Windows 10 Customization Tutorials
      My ComputerSystem Spec


  4. Posts : 11
    Windows 10 Enterprise S
    Thread Starter
       22 Oct 2017 #4

    Okay. Still no progress. I will keep searching trying. Thanks for the suggestions.
      My ComputerSystem Spec

  5.    23 Oct 2017 #5

    Is this what you wanted?
    Click image for larger version. 

Name:	Untitled.png 
Views:	5 
Size:	415.3 KB 
ID:	159744
      My ComputerSystem Spec


  6. Posts : 11
    Windows 10 Enterprise S
    Thread Starter
       24 Oct 2017 #6

    That would a huge YES. I have the context menu in place. The command executes when clicked. The CMD prompt opens and closes in a flash though.
      My ComputerSystem Spec


  7. Posts : 11
    Windows 10 Enterprise S
    Thread Starter
       24 Oct 2017 #7

    @dalchina

    That would a huge YES. I have the context menu in place. The command executes when clicked. The CMD prompt opens and closes in a flash though.
      My ComputerSystem Spec

  8.    24 Oct 2017 #8

    OK, please follow the procedure I outlined in my first post.

    The ahk file contains (from your post)
    Run, *runas "D:\Utilities\Sysinternals Suite\PsExec.exe" -s -i -d -w %HOMEDRIVE% -high %windir%\system32\cmd.exe /k
    exit

    Download, install and run Autohotkey, rt click and compile the ahk file to get what I've attached.

    (Note - there's no parameter in this example.. you could develop this so the command prompt launches open at the right place I guess).

    Here I used the same program (for convenience) to add the context menu entry:
    Click image for larger version. 

Name:	1.png 
Views:	3 
Size:	160.1 KB 
ID:	160025

    Click image for larger version. 

Name:	1.jpg 
Views:	18 
Size:	44.7 KB 
ID:	160027
    Add PsExec to Windows 10 Context Menu Attached Files
    Last edited by dalchina; 24 Oct 2017 at 16:08.
      My ComputerSystem Spec


  9. Posts : 11
    Windows 10 Enterprise S
    Thread Starter
       25 Oct 2017 #9

    @dalchina

    Um. Where is the first post. I see where you asked about my goal then the post with the attachment
      My ComputerSystem Spec

  10.    25 Oct 2017 #10

    What I've provided for you was done in the same way as per the link in my #2.
      My ComputerSystem Spec


 
Page 1 of 2 12 LastLast

Related Threads
Hi guys, is there any tweak to reduce the size of edge context menu. Make it same size as windows context menu(desktop right click, file explorer). The other modern apps also have larger context menu as compared to windows. Thanks
Hi I wondered if anyone out there has had a similar experience to me... For some weeks now I have had problems where the START MENU wouldn't launch, metro apps (OneDrive, Tweetium, Money, News etc) would fail to launch (just a blank window...
Hi All, Thanks for visiting my thread. I'm rebuilding all computers to Windows 10 at the School I work at. I've been able to lock down everything using Group Policy and Registry tweaks apart from two niggling little issues. 1. I can't get rid...
Hello. Today I got an update, and I noticed afterwards that the Windows 10 context menu when you right click the desktop went back to the old version and not the Windows 10 version. Also, the context menu for right clicking in the taskbar turned...
For all those that have a blank icon in network router and the non working network map feature as it is removed from windows 8/10 (this plug and play driver bug never got corrected from microsoft, imo) here is a reg file that fixes both of the 3...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:41.
Find Us