I don't see what the deal is. Why would you want to use the command prompt anyway? If you open power shell, and type cmd, then press return, you will get the command prompts. Simple as that. Power Shell is a very powerful tool, and I use it extensively.
Code: Windows PowerShell @powershell.exe,-109 Open Windows PowerShell @shell32.dll,-37446 Open Windows PowerShell as administrator @shell32.dll,-37448
Slightly updated version (fusion with previous and some abbodi): Code: ::COMMAND PROMPT HERE 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 ::POWERSHELL PROMPT HERE 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 Look: Spoiler
Using Powershell to launch elevated cmd doesn't seem very practical the one from @AndrewRichards lanuches elevated cmd directly, with the help of runas verb more sophisticated for me, since PS already exist in Explorer upper menu, i don't need it on right-click menu
Yeah, can add CMD to RunAs and it won't launch it from Powershell but elevated Powershell must be launched from PowerShell then since both can't be added to RunAs. And if there is already something in RunAs like "Take Ownership" then it will get replaced by CMD when adding the tweak. Code: Windows Registry Editor Version 5.00 ; Command Prompt [HKEY_CLASSES_ROOT\Directory\Background\shell\runas] @="Elevated Command Prompt" "Icon"="cmd.exe" "HasLUAShield"="" "SeparatorAfter"="" "Position"="Bottom" [HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command] @="cmd.exe /S /K pushd \"%V\"" [HKEY_CLASSES_ROOT\Directory\shell\runas] @="Elevated Command Prompt" "Icon"="cmd.exe" "HasLUAShield"="" "SeparatorAfter"="" "Position"="Bottom" [HKEY_CLASSES_ROOT\Directory\shell\runas\command] @="cmd.exe /S /K pushd \"%V\"" ; PowerShell [HKEY_CLASSES_ROOT\Directory\Background\shell\ElevatedPowerShell] @="Elevated PowerShell" "Icon"="powershell.exe" "HasLUAShield"="" "SeparatorBefore"="" "Position"="Bottom" [HKEY_CLASSES_ROOT\Directory\Background\shell\ElevatedPowerShell\command] @="Powershell Start-Process PowerShell -verb runas -ArgumentList '-noexit', 'Push-Location -literalPath ''\"%V\"'''" [HKEY_CLASSES_ROOT\Directory\shell\ElevatedPowerShell] @="Elevated PowerShell" "Icon"="powershell.exe" "HasLUAShield"="" "SeparatorBefore"="" "Position"="Bottom" [HKEY_CLASSES_ROOT\Directory\shell\ElevatedPowerShell\command] @="Powershell Start-Process PowerShell -verb runas -ArgumentList '-noexit', 'Push-Location -literalPath ''\"%V\"'''"
The above reg tweak works very well. It puts a Admin PowerShell and Admin Command Prompt in your right hand click
Mine, using abbodis additions.... EDIT: Using the MUIVerb values the text shown will be localized, depending on system language.
I guess i'm gonna need PS in context menu in Windows 11 after all, thanks to the hideous new file explorer and the Terminal joke