Replace PowerShell with Command Prompt in Context Menu in Windows 10
Replace PowerShell with Command Prompt in Context Menu in Windows 10: If you have recently updated to Windows 10 latest Creators Update then you may have already notice that when you press Shift and right-click on any folder the option “Open command window here” has been replaced by “Open PowerShell window here.” While many people don’t know what powershell is, how Microsoft is expecting them to use this functionality? Well, that’s why we have put together this guide which will show you how to add the option “Open command window here” in the File Explorer context menu again.
Also, the option for Command Prompt in Start Menu is replaced by PowerShell with the latest Creators Update but thankfully it can be restored via Windows Settings. But sadly there is no option/settings to replace the “open command window here” option from the right-click context menu on Windows 10. So without wasting any time let’s see how to actually Replace PowerShell with Command Prompt in Context Menu in Windows 10 with the help of the below-listed guide.
Replace PowerShell with Command Prompt in Context Menu in Windows 10
Make sure to create a restore point just in case something goes wrong.
Method 1: Use Registry Fix
Note: If you don’t want to use this method then you could try the method 2 which lets you manually edit the Registry entries in order to fix the issue.
1.Open empty Notepad file and then paste the following text as it is:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTDirectoryshellcmdprompt] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdprompt] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDirectoryBackgroundshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V"" [HKEY_CLASSES_ROOTDriveshellcmdprompt] @="@shell32.dll,-8506" "Extended"="" "NoWorkingDirectory"="" [HKEY_CLASSES_ROOTDriveshellcmdpromptcommand] @="cmd.exe /s /k pushd "%V""
2.Click File then Save as from the Notepad menu.
3.From Save as type drop-down select “All Files.“
4.Type the name of the file as cmdfix.reg (.reg extension is very important).
5.Now navigate to the location where you want to save the file and then click Save.
6.Double-click the file then click Yes to continue and this would add the option “Open command window here” in the context menu.
7.Now if you want to remove the “Open command window here” option from the context menu then open the notepad file and paste the below content in it:
Windows Registry Editor Version 5.00 [-HKEY_CLASSES_ROOTDirectoryshellcmd2] [-HKEY_CLASSES_ROOTDirectoryBackgroundshellcmd2] [-HKEY_CLASSES_ROOTDriveshellcmd2] [-HKEY_CLASSES_ROOTLibraryFolderBackgroundshellcmd2]
8.Select the Save as type as “All Files.” and name the file as Defaultcmd.reg.
9.Click Save and double click on the file in order to remove the option from the context menu. Now, this would Replace PowerShell with Command Prompt in Context Menu if not then continue to the next method.
Method 2: Manually create registries entries
1.Press Windows Key + R then type regedit and hit Enter to open Registry Editor.
2.Navigate to the following registry path:
HKEY_CLASSES_ROOTDirectoryshellcmd
3.Right-click on the cmd folder and then click on Permissions.
4.Now under the Security tab click the Advanced button.
5.On Advanced Security Settings window click Change next to Owner.
6.From Select User or Group window again click Advanced.
7.Now click Find Now and then select your user account from the list and then click OK.
8.Once you have added your user account then check mark “Replace owner on subcontainers and objects.“
9.Click Apply followed by OK.
10.You will again be taken to the Permissions window, from there select Administrators and then under permissions check mark Full Control.
11.Click Apply followed by OK.
12.Now inside the cmd folder, right-click on the HideBasedOnVelocityId DWORD, and select Rename.
13.Rename the above DWORD to ShowBasedOnVelocityId, and press Enter.
14.This would enable the “Open command window here” option as soon as you close the Registry Editor.
15.If you want to revert back then simply rename the DWORD again to HideBasedOnVelocityId. Again check and see if you are able to successfully Replace PowerShell with Command Prompt in Context Menu in Windows 10.
Even though following above steps seems to bring back the “Open command window here” option in the right click context menu but you would still see the “Open PowerShell window here” option and in order to remove it from the context menu follow the below-listed steps.
1.Press Windows Key + R then type regedit and hit Enter.
2.Navigate to the following registry path:
HKEY_CLASSES_ROOTDirectoryshellPowerShell
3.Right-click on PowerShell and then select Permissions.
4.Click Advanced button under permission window.
5.On Advanced Security Settings window click Change next to Owner.
6.From Select User or Group window again click Advanced.
7.Now click Find Now and then select your user account from the list and then click OK.
8.Once you have added your user account then check mark “Replace owner on subcontainers and objects.“
9.Click Apply followed by OK.
10.You will again be taken to the Permissions window, from there select Administrators and then under permissions check mark Full Control.
11.Click Apply followed by OK.
12.Now inside the PowerShell folder, right-click on the ShowBasedOnVelocityId DWORD, and select Rename.
13.Rename the above DWORD to HideBasedOnVelocityId, and press Enter.
14.This would disable the “Open PowerShell window here” option as soon as you close the Registry Editor.
15.If you want to revert back then simply rename the DWORD again to ShowBasedOnVelocityId.
Recommended for you:
That’s it, you have successfully Replace PowerShell with Command Prompt in Context Menu in Windows 10 but if you still have any queries regarding this article then please feel free to ask them in the comment’s section.