In Open++ Contextuel Menu

Discussion in 'Scripting' started by Acideb135, Aug 7, 2025.

  1. Acideb135

    Acideb135 MDL Junior Member

    Jun 25, 2024
    85
    28
    0
    #1 Acideb135, Aug 7, 2025
    Last edited: Aug 7, 2025
    Does anyone have a better command Arguments to open Command Prompt as admin here directly because with this it's just opened in system32 and not here in a folder ?
    Open++ https://download.cnet.com/open-64-bit/3000-2094_4-75157393.html

    In OpenXX.ini:
    Code:
    1.Type=0
    1.AssociateWith=0
    1.Title="Open Command Prompt here (Admin)"
    1.Program="powershell.exe"
    1.Arguments="-Command "Start-Process cmd -ArgumentList '/s,/c,cmd.exe' -Verb RunAs"
    1.WorkingDir=""
    1.Icon="C:\Softs'Ium\Shell\icons\cmd_admin.ico,0"
    1.FileTypes=""
     
  2. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,711
    94,207
    340
    cmd can't elevate by itself, powershell or VBScript is needed
     
  3. Acideb135

    Acideb135 MDL Junior Member

    Jun 25, 2024
    85
    28
    0
    because with this command in open++ it's just opened in system32 and not here in a folder

    If not with this it's good with Shift+right-click:
    Code:
    ;========================================== Menu contextuel avancé (Shift + clic droit) ==========================================
    ;========================================== Cmd Admin ==========================================
    ; Adds "Open Command Prompt here (in admin)" into the Advanced Pop-up menu (shift+ right-click)
    ; The command runs directly without displaying PowerShell
    [HKEY_CLASSES_ROOT\Directory\background\shell\OpenCmdHereAsAdmin]
    @="Open Command prompt here (admin)"
    "Icon"="C:\\Softs'Ium\\Shell\\icons\\cmd_admin.ico"
    "Extended"=""
    [HKEY_CLASSES_ROOT\Directory\background\shell\OpenCmdHereAsAdmin\command]
    @="cmd /c echo|set/p=\"%V\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
    ; ========================
    ; On the file itself (right click on a case)
    ; ========================
    [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin]
    @="Open Command Prompt on this folder(admin)"
    "Icon"="C:\\Softs'Ium\\Shell\\icons\\cmd_admin.ico"
    
    [HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHereAsAdmin\command]
    @="cmd /c echo|set/p=\"%L\"|powershell -NoP -W 1 -NonI -NoL \"SaPs 'cmd' -Args '/c \"\"\"cd /d',$([char]34+$Input+[char]34),'^&^& start /b cmd.exe\"\"\"' -Verb RunAs\""
    
     
  4. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,711
    94,207
    340
    You don't need powershell for built-in Explorer shell
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Drive\shell\MenuCmd]
    "MUIVerb"="@shell32.dll,-37444"
    "Icon"="cmd.exe"
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
    "Extended"=""
    
    [HKEY_CLASSES_ROOT\Directory\shell\MenuCmd]
    "MUIVerb"="@shell32.dll,-37444"
    "Icon"="cmd.exe"
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
    "Extended"=""
    
    [HKEY_CLASSES_ROOT\Directory\background\shell\MenuCmd]
    "MUIVerb"="@shell32.dll,-37444"
    "Icon"="cmd.exe"
    "ExtendedSubCommandsKey"="Directory\\ContextMenus\\MenuCmd"
    "Extended"=""
    
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas]
    "MUIVerb"="@shell32.dll,-37444"
    "Icon"="cmd.exe"
    "HasLUAShield"=""
    
    [HKEY_CLASSES_ROOT\Directory\ContextMenus\MenuCmd\shell\runas\command]
    @="cmd.exe /s /k pushd \"%V\""
    
    if you are on win7, replace 37444 with 22022
     
  5. Acideb135

    Acideb135 MDL Junior Member

    Jun 25, 2024
    85
    28
    0
    #5 Acideb135, Aug 7, 2025
    Last edited: Aug 7, 2025
    (OP)
    Thanks , It's for Win 10 LTSC 2021, will it be the same ?
    It is not possible without the submenu "
    ExtendedSubCommandsKey"
     
  6. abbodi1406

    abbodi1406 MDL KB0000001

    Feb 19, 2011
    17,711
    94,207
    340
  7. Acideb135

    Acideb135 MDL Junior Member

    Jun 25, 2024
    85
    28
    0
    And with Open++ contextuel menu , how can we proceed without launch an outdoor script ?