Add Windows Terminal to the Right-click Menu
Windows Terminal is now available on the Microsoft Store, so I switched from Fluent Terminal to Windows Terminal. Here's a record of the process to add it to the right-click menu.
Windows 11 has now default added 'Open in Terminal' in the right-click menu, so there's no need to add it separately. If you've already added it, you can simply delete [HKEY_CLASSES_ROOT\Directory\Background\shell\wt] from the registry.
Adding an Icon
First, create a folder named ‘Terminal’ in C:\Users\[YOUR_USER_NAME]\AppData\Local
. You can create it directly using the following command. Make sure to replace [YOUR_USER_NAME] with your own username!
1 | mkdir C:\Users\[YOUR_USER_NAME]\AppData\Local\Terminal |
Next, download the Windows Terminal icon to the folder you just created. If your browser doesn’t automatically download it, right-click and choose “Save as” to save it as ‘terminal.ico’.
terminal.ico DownloadRegistry Entry
Create a new text file and add the following content. Then, change the file extension to .reg
. Remember to replace [YOUR_USER_NAME] with your own username!
1 | Windows Registry Editor Version 5.00 |
Once done, double-click the file to merge it into the registry.
Modifying Configuration
At this point, you should already see the ‘Windows terminal here’ option in the right-click menu. However, when you click it, the terminal does not open in the current directory. To change this behavior, you need to modify the configuration file of ‘Windows Terminal.’
Open ‘Windows Terminal,’ click the top dropdown menu, and select ‘Settings.’ This will open the configuration file named ‘settings.json.’ The section you need to modify is as follows:
1 | // A profile specifies a command to execute paired with information about how it should look and feel. |
To launch ‘Windows Terminal’ in the current folder, you need to add "startingDirectory": "./"
below each section you want to modify. After making the changes, it should look like this:
1 | // A profile specifies a command to execute paired with information about how it should look and feel. |
After saving these changes, you’ll be able to use the right-click menu to run ‘Windows Terminal’ in the current folder.
Possible Issue
When using PowerShell, you may encounter an error message that says, “Cannot load file balabala.ps1 because running scripts is disabled on this system. For more information, see…” This is because the default ExecutionPolicy
is set to “Restricted,” which means it doesn’t allow the execution of any scripts.
The solution is to run PowerShell as an administrator and enter the command set-executionpolicy remotesigned
to lift the restriction.
References: