Brian Utterback
Brian Utterback

Reputation: 61

Set the path in portable vscode installation powershell terminal

I have multiple versions of vscode installed on my system with portable mode. I start each of them via a desktop shortcut. Since they are in portable mode, their installation directories are not in the default PATH variable.

When I make a new powershell terminal window, the portable vscode directory is not on the path. I need the command "code" in the terminal window to run the same vscode version that the terminal shell is running in. In other words, if I am running a portable vscode, and I open a powershell terminal and type the command "code", I want it to run the code.exe file that is the same as the vscode I am running it in, and not a different one, and not get the "object not found" message. For various reasons I do not want to have to type the full path.

So, in essence, I want to add a directory to the path variable when vscode starts up, with that directory being the base directory of the vscode itself.

Upvotes: 0

Views: 935

Answers (1)

m4verick
m4verick

Reputation: 89

You need to set this in: File/Preferences/Settings then select Workspace, there go to: Terminal/Integrated:Cmd and there specify An explicit start path where the terminal will be launched.

enter image description here

Upvotes: 0

Related Questions