About command prompt context

Discussion in 'Windows 10' started by Pandemicc, Jun 25, 2019.

  1. Pandemicc

    Pandemicc MDL Junior Member

    Aug 29, 2014
    67
    7
    0
    I have done everything on the internet but still I cannot get command prompt on context menu, is there any way to fix this?
     
  2. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    #2 kaljukass, Jun 25, 2019
    Last edited: Jun 25, 2019
    Where You want to add it, ie to desktop context menu, folder contact menu, directory contact menu etc?
    How it must be added there, simply open cmd.exe or open as administrator and there is some more options, so if You can a bit explain, what You need.
    Simplest is
    Code:
    Windows Registry Editor Version 5.00
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\CommandPrompt]
    @="Command Prompt"
    "Icon"="C:\\Windows\\system32\\cmd.exe,0"
    "Position"="Bottom"
    
    [HKEY_CLASSES_ROOT\Directory\Background\shell\CommandPrompt\Command]
    @="C:\\Windows\\system32\\cmd.exe"
    
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Pandemicc

    Pandemicc MDL Junior Member

    Aug 29, 2014
    67
    7
    0
    to the desktop context and folder context menu.
     
  4. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    Try this what I add into the previous post. Then we can go on.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Pandemicc

    Pandemicc MDL Junior Member

    Aug 29, 2014
    67
    7
    0
    how am I supposed to run that code?
     
  6. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270
    #6 Mr.X, Jun 25, 2019
    Last edited: Jun 26, 2019
    CMD Prompt and PowerShell in context menu for folders and drives:

    CMD prompt
    Code:
    ::Credits
    :s1ave77 https://forums.mydigitallife.net/members/s1ave77.293479/
    :abbodi1406 https://forums.mydigitallife.net/members/abbodi1406.204274/
    
    reg add "HKCR\Directory\shell\MenuCmd" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-22022" /f
    reg add "HKCR\Directory\shell\MenuCmd" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\Directory\shell\MenuCmd" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuCmd" /f
    reg add "HKCR\Directory\shell\MenuCmd" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Directory\background\shell\MenuCmd" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-22022" /f
    reg add "HKCR\Directory\background\shell\MenuCmd" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\Directory\background\shell\MenuCmd" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuCmd" /f
    reg add "HKCR\Directory\background\shell\MenuCmd" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuCmd" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-22022" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuCmd" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuCmd" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuCmd" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuCmd" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Drive\shell\MenuCmd" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-22022" /f
    reg add "HKCR\Drive\shell\MenuCmd" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\Drive\shell\MenuCmd" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuCmd" /f
    reg add "HKCR\Drive\shell\MenuCmd" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\open" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-37415" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\open" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\open\command" /ve /t REG_SZ /d "cmd.exe /s /k pushd \"%%V\"" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\runas" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-37444" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\runas" /v "Icon" /t REG_SZ /d "cmd.exe" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\ContextMenus\MenuCmd\shell\runas\command" /ve /t REG_SZ /d "cmd.exe /s /k pushd \"%%V\"" /f
    
    Code:
    ::Credits
    :s1ave77 https://forums.mydigitallife.net/members/s1ave77.293479/
    :abbodi1406 https://forums.mydigitallife.net/members/abbodi1406.204274/
    
    reg delete "HKCR\Directory\shell\MenuCmd" /f
    reg delete "HKCR\Directory\background\shell\MenuCmd" /f
    reg delete "HKCR\LibraryFolder\background\shell\MenuCmd" /f
    reg delete "HKCR\Drive\shell\MenuCmd" /f
    reg delete "HKCR\Directory\ContextMenus\MenuCmd\shell\open" /f
    reg delete "HKCR\Directory\ContextMenus\MenuCmd\shell\open\command" /f
    reg delete "HKCR\Directory\ContextMenus\MenuCmd\shell\runas" /f
    reg delete "HKCR\Directory\ContextMenus\MenuCmd\shell\runas\command" /f
    


    PowerShell
    Code:
    ::Credits
    :s1ave77 https://forums.mydigitallife.net/members/s1ave77.293479/
    :abbodi1406 https://forums.mydigitallife.net/members/abbodi1406.204274/
    
    reg add "HKCR\Directory\shell\MenuPowerShell" /v "MUIVerb" /t REG_SZ /d "@powershell.exe,-109" /f
    reg add "HKCR\Directory\shell\MenuPowerShell" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\Directory\shell\MenuPowerShell" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuPowerShell" /f
    reg add "HKCR\Directory\shell\MenuPowerShell" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Directory\background\shell\MenuPowerShell" /v "MUIVerb" /t REG_SZ /d "@powershell.exe,-109" /f
    reg add "HKCR\Directory\background\shell\MenuPowerShell" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\Directory\background\shell\MenuPowerShell" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuPowerShell" /f
    reg add "HKCR\Directory\background\shell\MenuPowerShell" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuPowerShell" /v "MUIVerb" /t REG_SZ /d "@powershell.exe,-109" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuPowerShell" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuPowerShell" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuPowerShell" /f
    reg add "HKCR\LibraryFolder\background\shell\MenuPowerShell" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Drive\shell\MenuPowerShell" /v "MUIVerb" /t REG_SZ /d "@powershell.exe,-109" /f
    reg add "HKCR\Drive\shell\MenuPowerShell" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\Drive\shell\MenuPowerShell" /v "ExtendedSubCommandsKey" /t REG_SZ /d "Directory\ContextMenus\MenuPowerShell" /f
    reg add "HKCR\Drive\shell\MenuPowerShell" /v "Position" /t REG_SZ /d "bottom" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\open" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-37446" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\open" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\open\command" /ve /t REG_SZ /d "powershell.exe -noexit -command Set-Location '%%V'" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas" /v "MUIVerb" /t REG_SZ /d "@shell32.dll,-37448" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas" /v "Icon" /t REG_SZ /d "powershell.exe" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas" /v "HasLUAShield" /t REG_SZ /d "" /f
    reg add "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas\command" /ve /t REG_SZ /d "powershell.exe -noexit -command Set-Location '%%V'" /f
    
    Code:
    ::Credits
    :s1ave77 https://forums.mydigitallife.net/members/s1ave77.293479/
    :abbodi1406 https://forums.mydigitallife.net/members/abbodi1406.204274/
    
    reg delete "HKCR\Directory\shell\MenuPowerShell" /f
    reg delete "HKCR\Directory\background\shell\MenuPowerShell" /f
    reg delete "HKCR\LibraryFolder\background\shell\MenuPowerShell" /f
    reg delete "HKCR\Drive\shell\MenuPowerShell" /f
    reg delete "HKCR\Directory\ContextMenus\MenuPowerShell\shell\open" /f
    reg delete "HKCR\Directory\ContextMenus\MenuPowerShell\shell\open\command" /f
    reg delete "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas" /f
    reg delete "HKCR\Directory\ContextMenus\MenuPowerShell\shell\runas\command" /f
    

    Save above codes in .cmd or .bat files to run them or just download here:
     

    Attached Files:

  7. MrChris

    MrChris MDL Addicted

    Jun 23, 2007
    532
    127
    30
    copy and past it into a new file called something like "rightclick.reg" or something similar. just make sure that the file ends in .reg then save the file and double click or run it.

    ~MC
     
  8. Pandemicc

    Pandemicc MDL Junior Member

    Aug 29, 2014
    67
    7
    0
    thank you all! it worked.
     
  9. kaljukass

    kaljukass MDL Guru

    Nov 26, 2012
    3,396
    1,322
    120
    Open Notepad => copy - paste this code on Notepad => Save as =>select All files, give name for example CommandPrompt_DirectoryBackground.reg => encording must be at least UTF-8
    Then open place where You save it, double click on it and then OK - OK. If You have UAC enabled, then is needed to click also Yes if is asked.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Mr.X

    Mr.X MDL Guru

    Jul 14, 2013
    8,575
    15,646
    270