Cédric
Cédric

Reputation: 23

Overriding extensions directory in vscode

One can specify the extension dir by running from command line: code --extensions-dir c:\path\to\ext

However, I would like to set this parameter even when running from the windows menu. I tried to modify the argv.json file located in the .vscode folder (like for https://code.visualstudio.com/docs/getstarted/locales). It didn't work.

Does anybody know how to fix this?

Bests

Upvotes: 1

Views: 3877

Answers (2)

Claudio Salvio
Claudio Salvio

Reputation: 21

As a complement to DG's response

If the VSCODE_EXTENSIONS environment variable is created as a system variable, it seems to affect all users.

In my case, I performed the following steps:

  • close VSCode on all users (I usually have one session open as administrator and another as non-administrator)
  • set the variable VSCODE_EXTENSIONS = c:\ProgramData\Code\extensions\
  • moved all extensions from the extensions folder of the administrator to c:\ProgramData\Code\extensions\
  • restart the computer
  • log in with both users and the extensions were available

It is convenient to mention since then the extensions installed by administrator are available to all users and are installed in the folder mentioned previously.

Upvotes: 2

DG.
DG.

Reputation: 96

Try creating an environment variable called VSCODE_EXTENSIONS with the value of c:\path\to\ext

Upvotes: 5

Related Questions