-
Notifications
You must be signed in to change notification settings - Fork 27.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have a setting for the extensions folder location #17691
Comments
Hi @benguenter , Unfortunately there is no But as a workaround you could use Hope this helps |
@benguenter what is your use case for changing the default location of extensions? |
Excellent, thankyou @alefragnani that helps. @egamma The reason I am looking for this is because at my workplace there is an applocker policy restricting programs/scripts from running in the appdata directory for security reasons. I was able to get around it by creating a symlink to a separate folder that was allowed but the config is a better solution. |
@egamma There is another reason, also in the workplace environment. The current extension folder resides inside |
+1 |
I don't have a quota for the user profile at work, but having all the extensions in the user profile makes logging in tediously slow. |
I have to run the command everytime when I open VS Code since my USERPROFILE contains special character like "%" or "&" that Omnisharp won't be able to recognize the default path everytime it launches. |
This feature would really help. I use the zip-version on a non-admin account on my school laptop, so I can't install most extensions unfortunately. |
I switched from Atom to VScode just because I can change the location of the extension data using the "--extensionHomePath" in the shortcut for VSCode. However, even this is unsatisfactory because everytime VSCode updates, I have to re-edit the shortcut. Please provide this feature. |
@message2prateek - It sounds like that is something I would like to do. However, I do not quite understand how you do it, where can you change the shortcut (is it the .exe file or du you only start VS Code via the terminal? Could you please explain further? |
hello @beccabusan you can create a shortcut of the .exe and add the parameter, see screenshot: |
Having a setting for defining the extensions path would be great, so I don't have to change the shortcut everytime I install an update. |
This would be super helpful - for the time being, I've had to alias code to sets my extension:
|
That better to add the function to setting of vscode, my username directory is "what'sup", it's install in C:\Users\what'sup\.vscode\extensions\ when I have installed vscode default, but some plugin program require the ditectory of components with that directory, the syntax got wrong with require ' C:\Users\what'sup\.vscode\extensions', cause the single quotes of what'up got intercept. |
https://code.visualstudio.com/docs/editor/portable
|
Hi, because of a security rule in my company, i needed to change the installation path of extensions, today i am doing this through the parameter --extensions-dir, but this parameter i can only use as an argument when starting vscode, i would suggest the creation of a configuration to inform the path of the extensions, so it would be much better to open the vscode through of the console code. |
Still pretty annoying to change the registry after each update. Here's my registry file:
|
Also hitting this - as others have mentioned, corporate roaming profiles do not work well with javascript extensions that can amount to Gigabytes of storage, and tens or hundreds of thousands of tiny files. It's also worth pointing out that modifying shortcuts to add the --extensions-dir setting certainly works, but only if you're directly launching VSCode. If you're launching it via a file association by double-clicking on a source file, it'll revert to the default location. Portable mode is a possibility, but the easiest thing would be if VSCode could have an env var added (VSCODE_EXTENSIONS_HOME or something) which would override the default storage location for extensions. That way, it would become trivial to roll out a global change to a large population of developers to put the extensions storage into a more practical location. |
hello,i think u can use command if you are in unix ,the command
|
It also seems that this option is not supported within WSL:
Context: I am using WSL + Docker + VSCode (so using VSCode Remote) but I have an apostrophe on my last name (Foo'Bar) and I cannot change the %USERPROFILE% directory because I'm using a corporate laptop so I created a C:\vscode_extensions directory to override that. OS: Windows 10 17763.615 x64_86. |
This works for me. I don't want to use tool much memory in my home directory, so I
This way vscode would install big files to another disk. |
Use case "Windows VDI deployment for Python Development". I work at an educational institute (BCIT). We support remote apps for online and campus courses. We want a consistently configured Python IDE (we are testing VS Code). We want the IDE to launch in a reasonable timeframe. Currently some of us are trying to copy the extensions to the user's profile just before the VSCode launches. I will try the --extensionHomePath, however, making sure we cover every way the IDE can be opened could be tricky. Having a file such as the idea.properties file that JetBrains uses would help. |
We use VS Code on a Terminal Server in a multi-user environment. We want all users to use a common set of extensions, installed and updated once (for operational and disk space reasons). We do not prefer portable mode because we want settings customizations kept separately for each user. So I also vote for a permanant setting for extensions root path, which does not require each call of code.cmd to be customized. |
I would say just the same, this is achieved with idea.properties file in IntelliJ. |
Hi, You just need to add a tag --extensions-dir="" in file code.cmd located in vscode's instalation path: "..\Microsoft VS Code\bin". Like this: this is original file configuration: After adding the tag --extensions-dir: After you do it, will be considered the extensions in you new directory and all new extensions will be instaled too. Also, will be possible to start vscode normally. |
Hi, The above tweak of the bin\code.cmd files does not work as described on VSC 1.37.1 on Win10. It seems that on Win10, code.exe is ran directly and the bin\code.cmd file is bypassed If I run bin\code.cmd manually with -extensionHomePath (not --extensions-dir=) then it seems to pick up the redirect, however, this would be the same modifying the Start Menu shortcut. Currently, what would force bin\code.cmd to be called? |
Yo, You are right, need to set up the shortcut too. My first explanation works only in command line, this calls bin\code.cmd. Thanks. |
UPDATE: Upon investigation, you have VSCODE_EXTENSIONS as an env variable defined, and this does work to override the directory. Should this issue be closed and maybe need a PR for the docs?
Thanks in advance! |
Hero of the day :-) Not the people who implemented this, but you for this great finding :-) |
@chrisschuyler Thanks! It works. For my usecase it's not about disk space but keeping a tidy $HOME folder, so using a symlink would do nothing in that regard. |
Closing this in favour of |
Does the env VSCODE_EXTENSIONS work now in version 1.51.0? |
Yes |
Is there a list of VSCODE_* variables in the documentation somewhere? I have been looking but no luck so far. Specifically for: |
This issue is closed?! Nowhere can I find how to actually set this env variable. Can someone at least put some instructions here? |
Are you on windows? |
Yes. |
Thanks! That was easy. Problem is though, that I wanted to move the .vscode folder, which it's still created everytime I launch, containing argv.json. |
Is there any way to permanently change where Extensions are installed and run for vscode?
The text was updated successfully, but these errors were encountered: