3

I'm trying to launch the new Windows Terminal through VSCode like I have with other terminal emulators.

Previously I've used the following setting in the VSCode JSON file settings.json to launch Cmder through VSCode with ctrl+C

"terminal.external.windowsExec": "C:\\Program Files\\cmder\\Cmder.exe",

However, trying the same with the directory of the Windows Terminal directory has been unsuccessful.

"terminal.external.windowsExec": "C:\\Program Files\\WindowsApps\\Microsoft.WindowsTerminal_1.0.1401.0_x64__8wekyb3d8bbwe\\WindowsTerminal.exe",
skillcap
  • 33
  • 1
  • 6
  • You start these programs via a URL protocol. This line lists all of them (incl http etc). `@For /f "tokens=1* delims=" %%A in ('reg query HKCR /f "URL:*" /s /d ^| findstr /c:"URL:" ^| findstr /v /c:"URL: " ^| Sort') Do @Echo %%A %%B`. When you have the protocol name append `:// ` to it. So Weather app is `msnweather://`. You need to Shell Execute. –  May 21 '20 at 05:30
  • Alright, so I was able to navigate to the folder via Powershell and find the app ID in AppManifest.XML, so the following allows me to launch the terminal from VSCode 'shell:appsFolder\Microsoft.WindowsTerminal_8wekyb3d8bbwe!App' Unfortunately it isn't opening the folder I'm working in so that's something I need to work on. – skillcap May 21 '20 at 14:35
  • I thought that the executable was `wt.exe`, so if I'm correct, you should be using `"terminal.external.windowsExec": "C:\\Users\\skillcap\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe",` in your `settings.json`. _(remember to change the user name as required)_. As the executable should also have added to your `%PATH%` you should be able to generally start it using just `wt`, _(with an unmodified `%PATHEXT%` variable)_. **Also added as answer**. – Compo May 21 '20 at 14:46

1 Answers1

4

I thought that the executable was wt.exe, so if I'm correct, in your settings.json, you should be using:

"terminal.external.windowsExec": "C:\\Users\\skillcap\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe",

(remember to change the user name as required).

As a side note, the executable should also have been added to your %PATH%, so you should be able to generally start it using just wt, (with an unmodified %PATHEXT% variable).

Compo
  • 36,585
  • 5
  • 27
  • 39