Vscode: Include support for system-wide mandatory/default settings

Created on 3 Jun 2017  路  13Comments  路  Source: microsoft/vscode

  • VSCode Version: 1.12.2
  • OS Version: Windows 10

Steps to Reproduce:

  1. Install vscode as an administrator
  2. Launch vscode as a different (regular) user

It is currently not possible for an administrator to define mandatory and/or default settings that apply to all users/workspaces. This would be very helpful in a corporate/enterprise setting where we want users to have a consistent experience, or where the infrastructure demands certain configs (e.g. "update.channel": "none").

Suggestion:
a) Define an environment variable that points to a json file with mandatory settings, which override user/workspace settings.
b) Define another environment variable that points to a json file with default settings, which get copied to the user settings file when a user launches vscode for the first time.

If suggestion a) is difficult to implement I will settle for b) and use an extension (e.g. Fetch User Environment) to manage the mandatory settings.

config feature-request

Most helpful comment

On NixOS we have the vscode-with-extensions,which allow to package VSCode with preinstalled extensions,but then you can't install extensions from the VSCode UI.
This is problematic as a few extensions needs to be fixed for use on NixOS,and this feature would allow to use extensions both from the nix store (with all the paths fixed) and the larger VSCode marketplace

All 13 comments

//cc @egamma

VSCode is great, but in managed environments the inability to provide and control default settings for all users is a big problem.

A few weeks ago I intended to migrate from sublimetext to vsc, but this issue was a show stopper. For me (developer and administrator) it is unusable without default settings / the ability to be "installed" (for all users) by copying one single folder.

There also appears to be no simple way to install extensions for all users. On top of this, even the per-user offline extensions needs to be deployed as a subsequent step post-install:

Start-Process "VSCodeSetup-x64-1.19.2.exe" -ArgumentList /silent, /mergetasks='!runcode,addcontextmenufiles,addcontextmenufolders,addtopath' -Wait

# VISX files downloaded to \extensions in the installation root for offline install.
Get-ChildItem "$PSScriptRoot\extensions" | % {
    Start-Process "C:\Program Files\Microsoft VS Code\bin\code.cmd" -ArgumentList "--install-extension $($_.FullName)" -Wait
}

But, log on as a different user and there are no extensions.

It would be great if the installer could automatically deploy these during the installation, or at least allow for a multi-user deployment of the extension. I think the Visual Studio VSIXInstaller.exe can/could do this with /admin? I appreciate a system-level / all users installation would prevent individual users from upgrading or managing the extension for themselves in the future, but in a managed development environment that's not such a bad thing (especially with additional security requirements such as white-listing). Even being able to point it to a local UNC share by default would be handy. Some development workstations don't have Internet access anyway.

Given this is replacing the PowerShell ISE in core 6+, it's so far looking pretty difficult to deploy this in large enterprise environments while retaining some manner of consistency.

VS Code has become a very good and powerful development environment, much lighter than huge programs like the "real" Visual Studio or Eclipse. Unfortunately, the absence of system-wide configuration capabilities (and especially of system-wide extension installation) is a big problem for managed environments. Of course, everything can be done with appropriate login (or program startup) scripts, but I see that more like DIY rather than a professional solution. In my opinion, a system-wide configuration file and extension directory would be a very good starting point (GPO support would of course be welcome too... but this is less urgent).

Any progess on this?
Like all above, it's hard (no way) to deploy VSCode in a large environment and have a manner of consistency.

This feature request has been sitting here for over a year. Is this even difficult? How do we escalate issues?

Problem for me too.

I installed powershell core and changed terminal.integrated.shell.windows to pwsh.exe but hitting F1
the Terminal: Select Default shell still shows the path to the powershell V1 exe.

Would like to be able to change terminal.integrated.shell.windows in default settings to use the new powershell.

Atm every time I switch between Wsl and back to powershell I have to update user settings to pwsh.exe again!

I'd also like to use VSCode natively installed on Windows 10 while editing and working on files in the WSL system without ruining my linux permissions etc. (we use Linux projects on GitHub). On my 8 GB ram laptop a Ubuntu VM runs kinda slow.

On NixOS we have the vscode-with-extensions,which allow to package VSCode with preinstalled extensions,but then you can't install extensions from the VSCode UI.
This is problematic as a few extensions needs to be fixed for use on NixOS,and this feature would allow to use extensions both from the nix store (with all the paths fixed) and the larger VSCode marketplace

A way to select the installation directory would also be nice.

Hi @GreatTeacherOni, I think what you requested is a different feature request.

I would imagine you might really want enterprises to be using a standard mechanism for this rather than each enterprise rolling their own extension or using one of the settings extensions to try and achieve a similar result. By hook or by crook they'll find a way to do what they need to do, but it would be so much less pain for all if there was a standard mechanism.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shanalikhan picture shanalikhan  路  3Comments

mrkiley picture mrkiley  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments

v-pavanp picture v-pavanp  路  3Comments

vsccarl picture vsccarl  路  3Comments