winget-pkgs icon indicating copy to clipboard operation
winget-pkgs copied to clipboard

Add Visual Studio Code System Wide Installer Package

Open mubshrx opened this issue 6 years ago • 18 comments

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

mubshrx avatar Aug 22 '20 12:08 mubshrx

Gonna add it. Thanks for the suggestion.

Edit: @mhm13dev Done it. 🥂

yigitemres avatar Aug 24 '20 17:08 yigitemres

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 avatar Aug 24 '20 19:08 lszomoru

@lszomoru If that's the case, probably my manual pr rejected. I'm gonna close my own pr. Thanks for hard work! 🥂

yigitemres avatar Aug 24 '20 20:08 yigitemres

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.

denelon avatar Oct 19 '20 16:10 denelon

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.

lszomoru avatar Oct 19 '20 16:10 lszomoru

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.

ghost avatar Jan 06 '21 22:01 ghost

@lszomoru is there any update on the status of the system wide installer?

alec-hs avatar Jan 28 '21 11:01 alec-hs

@alec-hs, apologies for the delay on this one. I will try to tackle this one next week.

lszomoru avatar Jan 29 '21 10:01 lszomoru

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.

lszomoru avatar Feb 02 '21 10:02 lszomoru

Just tested - seems all good. Thanks for the quick turn around!

alec-hs avatar Feb 02 '21 19:02 alec-hs

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 avatar Apr 01 '21 00:04 denelon

@denelon, I believe that his issue has been resolved and it can be closed. Thanks!

lszomoru avatar Jun 28 '21 13:06 lszomoru

I just tried and it installed as user scope instead of system-wide. ver: 1.65.2

556556bt avatar Mar 14 '22 12:03 556556bt

winget install Microsoft.VisualStudioCode --scope machine doesn't seem to do anything. I can only install with user scope.

rykerwilliams avatar Jul 02 '24 00:07 rykerwilliams

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.

ErcinDedeoglu avatar Jul 06 '24 07:07 ErcinDedeoglu

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:

Image

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

xenago avatar Oct 25 '24 18:10 xenago

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"'

woter1832 avatar Nov 25 '24 17:11 woter1832

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.

rip747 avatar Mar 08 '25 12:03 rip747