Skip to content
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

MSI based Windows setup #33184

Closed
alexhass opened this issue Aug 26, 2017 · 46 comments
Closed

MSI based Windows setup #33184

alexhass opened this issue Aug 26, 2017 · 46 comments
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues *out-of-scope Posted issue is not in scope of VS Code windows VS Code on Windows issues
Milestone

Comments

@alexhass
Copy link

alexhass commented Aug 26, 2017

I need to install VS Code for our developers. They are not allowed to install software. As we are only using AD deployment this requires a proper MSI setup that installs per machine. In the installer I need to be able to disable automatic updates on machine level.

I have only seen a bad InnoSetup setup that cannot deployed via AD. Can you create a modern installer based on WiX toolkit, please? If you need help I may be able to help.

@Tyriar Tyriar added install-update VS Code installation and upgrade system issues windows VS Code on Windows issues labels Aug 26, 2017
@joaomoreno joaomoreno added this to the Backlog milestone Aug 28, 2017
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Aug 28, 2017
@joaomoreno joaomoreno removed their assignment Aug 28, 2017
@joaomoreno joaomoreno changed the title MSI based per machine installer MSI based setup Aug 28, 2017
@joaomoreno joaomoreno changed the title MSI based setup MSI based Windows setup Aug 28, 2017
@ajf8729
Copy link

ajf8729 commented Oct 12, 2017

This would make it much easier to deploy and update via ConfigMgr.

@alexhass
Copy link
Author

alexhass commented Nov 1, 2017

I worked on this issue the last days and I'm close to complete the migration from Inno to WiX setup, but I'm not sure if I'm allowed to post the WiX setup scripts and all the VSCode logos after the answers from #37187. That suxxx.

Is the MS setup developer available by email to exchange setup files with logos without making them public and without breaking a law/copyright?

@alexhass
Copy link
Author

alexhass commented Nov 10, 2017

Shared the code at #38008

@tobi76
Copy link

tobi76 commented Jul 16, 2018

I found this issue. During reading I'm currently not sure about the status. Will there be a MSI Installer in the near future? Any plans? That would be nice.

@alexhass
Copy link
Author

alexhass commented Sep 13, 2018

There is no way to deploy software via AD without MSI setup. Please reopen #38008!

@nzdudeinsydney
Copy link

At present, the only way to disable updates appears to be forcing a new settings.json into each user's profile. At the very least, can we please get VS Code to respect a HKLM registry setting that would disable updates?

@bluikko
Copy link

bluikko commented Mar 25, 2019

So very, very disappoointing that there is no MSI format installer.

How is it possible that an MS product does not support AD Software Installation?

@Hickory420
Copy link

So, I found this to be an issue for me as well. But, there is a "workaround" (hack)...

Since they offer a .zip format, you would have to script unzipping of the file and creating a shortcut on the user's desktop.

Since I'm not going to hold my breath for this feature, I will be implementing this... unfortunately. Once I have written the code, I will provide a link to it here.

I would like to also thank the VSCode team for such a great product. In the grand scheme of things, this application is hands down the best text editor, surpassing Sublime Text, Atom, Notepad++, you name it. I am not a developer, but I use this program daily. So, thank you for sharing the <3

@engcme
Copy link

engcme commented May 30, 2019

@Hickory420 Hey I am working on implementing this at my work. Have you come up with that work around you were speaking of?

@alexhass
Copy link
Author

I have already shared the installer code with vscode team... its in public github repro

@ThomasRunting
Copy link

i would love this for intune for my students

@Hickory420
Copy link

Hickory420 commented Oct 18, 2019

I am aware VBScript is old school and out dated, I could have done this in powershell, but I figured since there are different PS versions out there, this would cover most systems all the way from Windows XP. Admittedly not my cleanest vbscript.

Option Explicit

Dim objFSO, objWscriptShell, objShellApplication
Dim ZipFile, UnzipDir, FilesInZip

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWscriptShell = CreateObject("WScript.Shell")
Set objShellApplication = CreateObject("Shell.Application")

ZipFile = "\\server01\some\accessible\share\VSCode-win32-x64-1.36.1.zip"
UnzipDir = "C:\path\on\local\machine"

' Make sure the directory we are extracting to exists
If Not objFSO.FolderExists(UnzipDir) Then objFSO.CreateFolder(UnzipDir)

Set FilesInZip = objShellApplication.NameSpace(ZipFile).items

objShellApplication.NameSpace(UnzipDir).CopyHere(FilesInZip)


' Create the shortcut
Dim VSCode_ShortCutName, VSCode_DesktopShortCut, VSCode_FullExecutable, lnk

VSCode_ShortCutName    = "Visual Studio Code.lnk"
VSCode_DesktopShortCut = objWscriptShell.SpecialFolders("desktop") & "\" & VSCode_ShortCutName
VSCode_FullExecutable  = UnzipDir & "\Code.exe"

' Reset the shortcut every time this script is run.
If objFSO.FileExists(VSCode_DesktopShortCut) Then objFSO.DeleteFile VSCode_DesktopShortCut,True

If Not objFSO.FileExists(VSCode_DesktopShortCut) Then
  Set lnk = objWscriptShell.CreateShortcut(VSCode_DesktopShortCut)
  lnk.targetpath   = VSCode_FullExecutable
  lnk.IconLocation = VSCode_FullExecutable & ",0"
  lnk.Description  = "Best Text Editor Ever"
  lnk.WorkingDirectory = UnzipDir
  lnk.save
End If

I have tested this with files on my local machine and it works. You can put this script in a Logon group policy and the end user will get VSCode deployed to their machine.

Edit: One caveat with the Desktop as the destination for the shortcut is, Windows Defender Protected Folders. You will either need to allow [cw]script.exe to make changes to the desktop, or save the shortcut elsewhere.

Although, I have not tested this on the objWscriptShell.SpecialFolders("AllUsersDesktop")
I don't know if Windows Defender will complain about saving to that location.

@pyoungberg
Copy link

Any update?

@cconrado
Copy link

Would Love It!

@joaomoreno joaomoreno added the *out-of-scope Posted issue is not in scope of VS Code label Nov 12, 2020
@alexhass
Copy link
Author

We still need this.

@bluikko
Copy link

bluikko commented Nov 13, 2020

Agreed - but maybe efforts should concentrate on VSCodium which seems to understand the value of an MSI?

@shcgitpf
Copy link

Still need this. Coding is huge in education, and Microsoft actively refusing to use Microsoft's own MSI deployment mechanisms just throws barriers up in front of students and admins trying to deploy this software. This should be as simple as I upload an MSI to Intune / Endpoint and assign it to students, many of whom are forced to be at home due to the pandemic. Instead I'm now going to have to screw around trying to shoe-horn an exe installer into SCCM and somehow get this to the students at home.

Not cool Microsoft.

@zastarbe
Copy link

zastarbe commented Mar 2, 2021

Still need an MSI for vscode. Please!

@mbailey-eh
Copy link

If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.

Still need an MSI. But doesn't sound like you're listening.

@bluikko
Copy link

bluikko commented Jul 20, 2021

Of course it is crucial. It is the standard packaging format of installers for Windows, for petes sake!

@Szuni79
Copy link

Szuni79 commented Oct 25, 2021

Hey, guys, that is pretty much dumb, that even the MS wont create a correct MSI installer for a Flagship-Product?!?!?!
MSI is a good thing and we need it! We are deploying the VS Code on hundreds of schoolcomputers, and then the others... We REALLY NEED an MSI installer. Please dont say, that its not so important. That is a MUST HAVE! Thanks.

@bluikko
Copy link

bluikko commented Oct 25, 2021

@Szuni79 The VSCodium project (de-branded VSCode) has an MSI installer which works almost perfectly. Just set the option "ignore language" unless you have Chinese language set in Windows. No need to wait around for Microsoft.

@poldis
Copy link

poldis commented Oct 28, 2021

Still need this for VSCode (I know VSCodium has it)

@bluikko
Copy link

bluikko commented Oct 28, 2021

Still need this for VSCode (I know VSCodium has it)

I have not noticed anything missing from VSCodium. Should I be aware of some drawbacks, or it's political/compliance/etc kind of thing?

@poldis
Copy link

poldis commented Oct 28, 2021

I have not noticed anything missing from VSCodium. Should I be aware of some drawbacks, or it's political/compliance/etc kind of thing?

No, VSCodium works fine, it's just the fact that we need VSCode for the whole school and no one will recognize it if it's called VSCodium and it has a different symbol.

@ghost
Copy link

ghost commented Jan 31, 2022

Just use VSCodium and the Story is to an end

@jordanmills
Copy link

Still need this. VSCodium is fine and all but it's not what users expect and they (or the MS consultant insists on VS code even though it's incomplete).

@Mistic92
Copy link

Mistic92 commented Jun 2, 2022

Still no update on that?

@bluikko
Copy link

bluikko commented Jun 2, 2022

Still no update on that?

VSCodium keeps releasing new versions at a steady pace following VSCode. I have given up here.

@ivansieder
Copy link

we're using the inno-based exe to deploy from intune as Win32-package. It works, if VS Code is closed. However, if it's currently running, it still tries to install, breaks the installation and VS Code gets unusable until it's getting reinstalled. Is there any workaround to pass as arguments to update only when VS Code is closed?

@JackTrapper
Copy link

The issue with installing VS Code in a machine wide location (e.g. Program Files) is:

  • it would require the users to be administrators
  • by default automatic updates wouldn't work

Both of these problems are fixed if you grant Full Control to of the Program Files folder to all Users.

That way:

  • develops can install VS Code by themselves
  • VS Code can auto-update itself

Otherwise you're just heading into a world of pain of:

  • standard users not being able to install VS Code
  • standard users not being able to update VS Code

@shcgitpf
Copy link

shcgitpf commented Nov 3, 2022

  • standard users not being able to install VS Code
  • standard users not being able to update VS Code

Good.

Speaking as an academic sysadmin we don't want users installing software. If an update is required, it is our job to deploy it. Using MSI for this mechanism would make this process INFINITELY simpler.

@ajf8729
Copy link

ajf8729 commented Nov 3, 2022

Both of these problems are fixed if you grant Full Control to of the Program Files folder to all Users

This is a very bad decision to make security-wise. A malicious user could replace the executable with a malicious version. It could also be used as a way to bypass AppLocker if configured to trust system-level locations.

@jordanmills
Copy link

That's not a world of pain. That's exactly how it's supposed to work. Giving the built in users group full control of program files is an incredibly bad idea and a shortcut to credential and account theft of any account (user or admin) that signs on to that computer. It should never be done.

@Szuni79
Copy link

Szuni79 commented Nov 3, 2022

  • it would require the users to be administrators
  • by default automatic updates wouldn't work

Both of these problems are fixed if you grant Full Control to of the Program Files folder to all Users.

Guys, that is an absolutely wrong way! Not only sysadmin-level pro developers using VS Code. I'm administering nearly 500 school-PC with over 1500 student. No one have the ability to install something. They aren't developers and aren't power users, so they don't have any admin rights. But they are learning VS Code and they needed the updates.

  • develops can install VS Code by themselves

Never mind! Even the idea is a nightmare that user can install something on multi-user computers!

  • VS Code can auto-update itself

That isn't an option. That is a must! It should be a default ability, done by System and not by User.

@bluikko
Copy link

bluikko commented Nov 4, 2022

The issue with installing VS Code in a machine wide location (e.g. Program Files) is:

  • it would require the users to be administrators
  • by default automatic updates wouldn't work

This is how managed installations are supposed to work and the listed "issues" are actually benefits!
The user is not supposed to be installing, or have the ability to install, anything. Everything is installed automatically by deployment tools.

I hope nobody follows the suggestion to change permissions on Program Files, this will be a security nightmare. I believe that the OP should edit his post to remove that ridiculous idea.

@alexhass
Copy link
Author

alexhass commented Nov 4, 2022

  • it would require the users to be administrators

Wrong.

  • by default automatic updates wouldn't work

Intentionally, yes.

Both of these problems are fixed if you grant Full Control to of the Program Files folder to all Users.

OMG... never do this!!!

Guys, that is an absolutely wrong way! Not only sysadmin-level pro developers using VS Code. I'm administering nearly 500 school-PC with over 1500 student. No one have the ability to install something. They aren't developers and aren't power users, so they don't have any admin rights. But they are learning VS Code and they needed the updates.

This is not what the MSI package is made for. This package protects your students from finding every day a different vscode version that breaks their code. It is soley the admins (or professor / teachers) job to make sure the proper version is installed on all systems. Every PC should be the 100% same - otherwise they spend every day an hour to learn that an wrong vscode version is installed on a few but not all computers or a previous student has broken it and it does not fit to their lessons.

@PeterCheungHK
Copy link

@alexhass
They always think the user must use Latest version , but in fact there are many factors the administrator need control the version

@kale1d0code
Copy link

MSI would be too convenient for the end user.
Plus they wouldn't be able to charge you for centralised deployment through their SCCM software if they fixed their installer.

Think about it.

@ghost
Copy link

ghost commented Apr 17, 2023

Perhaps this could be implemented in a fork of Code - OSS so people who need it at least can use it? Without the official marketplace, of course. But these enterprise users probably don't want users to install the extensions that they want, either - they probably want to install the same extensions for all users.

@bluikko
Copy link

bluikko commented Apr 18, 2023

@aitor-gomila Already exists: https://www.github.com/VSCodium/vscodium/releases

@Juff-Ma
Copy link

Juff-Ma commented Aug 2, 2024

If someone is still interested in this, I wrote a small tool that creates a VSCode installation MSI.

@JackTrapper
Copy link

If an update is required, it is our job to deploy it.

That is a fine solution as long as:

  • you deploy it immediately (few hours after new version)
  • the user does not have to remind you to do it

Otherwise it's a non-starter.

@alexhass
Copy link
Author

alexhass commented Aug 2, 2024

Vscodium has an msi setup with updates disabled. This is crucial.

@RokeJulianLockhart

This comment was marked as duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality install-update VS Code installation and upgrade system issues *out-of-scope Posted issue is not in scope of VS Code windows VS Code on Windows issues
Projects
None yet
Development

No branches or pull requests