Add Visual Studio Code System Wide Installer Package
I am tagging @lszomoru because he is maintaining the VS Code Package.
As we have packages for VisualStudioCode and VisualStudioCodeInsiders but they both are the user installers. I want you to please add a System wide installer for both of these packages.
Package Requested
Manifest: VisualStudioCodeSystem
Fill out as much of the manifest as you can:
Id: string # Microsoft.VisualStudioCodeSystem
Publisher: Microsoft Corporation
Name: Visual Studio Code - System Installer
Version: 1.48.1.3dd905126b
License: Copyright (c) Microsoft Corporation
InstallerType: string # enumeration of supported installer types (exe, msi, msix, inno, wix, nullsoft, appx)
Installers:
- Arch: string # enumeration of supported architectures
Url: string # path to download installation file
Sha256: string # SHA256 calculated from installer
# ManifestVersion: 0.1.0
Gonna add it. Thanks for the suggestion.
Edit: @mhm13dev Done it. 🥂
Thanks for tagging me. Publishing the winget package is done though our release pipeline so rather than adding these packages manually, let me update our release pipeline to start publishing the system packages as well. I have filed an issue in the vscode repo to complete this work - https://github.com/microsoft/vscode/issues/105307.
@lszomoru If that's the case, probably my manual pr rejected. I'm gonna close my own pr. Thanks for hard work! 🥂
I think we're going to need https://github.com/microsoft/winget-cli/issues/149 to be able to have "both" types of installers available.
We actually have two separate setup packages for System/User so the current plan is to start publishing the manifest for the system setup along with the user setup. It is on our backlog and I hope to get to it in the month of November. Apologies for the delay.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
@lszomoru is there any update on the status of the system wide installer?
@alec-hs, apologies for the delay on this one. I will try to tackle this one next week.
I have updated our release pipeline and now we are publishing User/System installers for x86 and x64.
Please run winget search vscode to see the available packages. Let me know if you have any questions or concerns.
Just tested - seems all good. Thanks for the quick turn around!
We're working on https://github.com/microsoft/winget-cli/issues/149 User vs. System. Once that's in place, Visual Studio Code and Visual Studio Code Insiders can go back to being a single package with multiple installers (I hope 😄). We will need to do some local testing to make sure things are correctly supported.
@denelon, I believe that his issue has been resolved and it can be closed. Thanks!
I just tried and it installed as user scope instead of system-wide. ver: 1.65.2
winget install Microsoft.VisualStudioCode --scope machine doesn't seem to do anything. I can only install with user scope.
I can confirm that if you have the required permissions, it installs at the system level instead of the user level via:
winget install Microsoft.VisualStudioCode --scope machine
Thanks.
I can also replicate the issue, running winget install Microsoft.VisualStudioCode --scope machine does nothing, even with elevated permissions. It just spins and then stops, it doesn't even try to pull the package:
Installing without --scope machine parameter works fine, but is single-user and not system-wide.
Edit: I think this is a red herring; it seems to work if I set machine level in settings.json. leaving for posterity
Just ran the installation using the following code and it's installed in the scope of machine:
winget install --force Microsoft.VisualStudioCode --scope machine --override '/VERYSILENT /SP- /MERGETAKS="!runcode,!desktopicon,addcontextmenufiles,addcontextmenufolders,associatewithfiles,addtopath"'
why not just go with OP's suggestion and have a separate package and ID so it isn't confusing for everyone? You have to make it simple. Most people (including myself) do searches for packages in winget as:
winget search "visual studio code"
That yields the following results:
`PS C:\Users\tpetr> winget search "visual studio code" Name Id Version Source
Visual Studio Code - Insiders XP8LFCZM790F6B Unknown msstore Visual Studio Code XP9KHM4BK9FZ7Q Unknown msstore Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.98.0 winget Microsoft Visual Studio Code CLI Microsoft.VisualStudioCode.CLI 1.98.0 winget Microsoft Visual Studio Code Insiders Microsoft.VisualStudioCode.Insiders 1.98.0 winget Microsoft Visual Studio Code Insiders CLI Microsoft.VisualStudioCode.Insiders.CLI 1.99.0 winget`
That said, I am naturally going to installation as:
winget install Microsoft.VisualStudioCode
which will install the user scope of VSCODE. There is zero indication to run some crazy installation string in order to get the system scope installation to run.