First, you want to open up regedit and navigate to Computer\HKEY_CLASSES_ROOT\batfile\shell\open\command
. Right click on the value named "Default" and click modify, change the value data to wt.exe -w 0 new-tab -d . "%1" %*
. You can stop here if you wish as now when you run a .bat it will open in Windows Terminal. But if you want to be able to right click on a file and have the option to run in cmd, make a new key in Computer\HKEY_CLASSES_ROOT\batfile\shell
called wtopen
, change the "Default" value data in that to "Open in cmd". Then, make a subkey in Computer\HKEY_CLASSES_ROOT\batfile\shell\wtopen
called "command" and change the "Default" value data to "%1" %*
. Now if you right click on a .bat you should have the option to "Run in cmd".
Created
December 22, 2021 15:14
-
-
Save ImmortalTerror/03498ab96ee50dcdcedfc239e840f365 to your computer and use it in GitHub Desktop.
How to make batchfiles open with windows terminal
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment