SOLVED

installing visual studio code via intune

Bronze Contributor

Hi all,

 

Im struggling to install visual studio code exe via intune! Any suggestions on how I can do this? MSIs are easy but exes Im struggling! 

 

Thanks in advance

16 Replies
What have you tried?

You can either try it as a Line of Business MSI deployment, or WIn32 application...
Im not sure on how to do this exe as a win32 app but I do see doing it this way is recommended
Here is a good guide on how to take an MSI and deploy it as a Win32 app, including building it.

https://www.blogabout.cloud/2020/11/2113/

I guess I have noted down some hints the last time I needed to do this...If its the runtime, why not deploying it with winget or chocolatey?
Hi Can you recap please? or can you please send me a link to the last time you noted this. I want to know how to deploy generic exe too so I can do this for future ones 🙂

Oh what are winget or chocolatey?

Thanks in advance your help is always appreciated!!
I cant find the msi version and only have the exe one
best response confirmed by AB21805 (Bronze Contributor)
Solution
Hey AB21805,

package the x64 installer into a .intunewin file with the tool "Microsoft Win32 Content Prep Tool"
https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool

and use this for the install command:
VSCodeSetup-x64-1.57.1.exe /verysilent /norestart /mergetasks=!runcode /log="%temp%\VSCodeInstall.log"

and this for the uninstall command:
"C:\Program Files\Microsoft VS Code\unins000.exe" /verysilent /norestart

The detection method should check for file exists:
"C:\Program Files\Microsoft VS Code\Code.exe"

best,
Oliver

Hi @Oliver Kieselbach 

 

I have tried this but cant figure out where im going wrong! 

 

Screenshot 2021-06-24 at 11.46.18 AM.pngScreenshot 2021-06-24 at 11.46.50 AM.pngScreenshot 2021-06-24 at 11.47.17 AM.pngScreenshot 2021-06-24 at 11.48.35 AM.png

 

When creating the intunewin I used the set up file as the install.bat 

 

Any ideas where im going wrong? 

@AB21805 

 

Here is the link to some information about them... 

 

Cloudy: With a chance of Winget - Call4Cloud

Just like Oliver is advising. ANother possibility would be to create a win32 app..
IN the screenshots you send, the install command is wrong, it should be

VSCodeSetup-ia32-1.57.1.exe /verysilent /norestart /mergetasks=!runcode /log="%temp%\VSCodeInstall.log"
Is it the VSCodeSetup-ia32-1.57.1.exe part I have wrong? I have named it VSCodeUserSetup-ia32-1.57.1.exe as the file is called this when I downloaded it?

Do I need to change the name of the MSI and do over again?
I downloaded und used the x64 installer not the 32-bit version. If you are using the 32-bit version (it is seen on the name VSCodeUserSetup-ia32-*) then you have to adjust the uninstall and install commands.

install:
VSCodeSetup-ia32-1.57.1.exe /verysilent /norestart /mergetasks=!runcode /log="%temp%\VSCodeInstall.log"
uninstall:
"C:\Program Files (x86)\Microsoft VS Code\unins000.exe" /verysilent /norestart

the detection rule should also point to the x86 folder:
"C:\Program Files (x86)\Microsoft VS Code\Code.exe"

best,
Oliver

Thank you @Oliver Kieselbach @Rudy_Ooms_MVP  for your help! I was defiantly doing it wrong to start and it was 64 bit one i needed 

Hi, just a quick one and maybe quite obvious but how do you know the location of the uninstall/install and the file name of the uninstall? Is this simply because you download it locally first?
Correct, I did a quick install in the Windows Sandbox to check out path etc. 👍
ill check it out!
1 best response

Accepted Solutions
best response confirmed by AB21805 (Bronze Contributor)
Solution
Hey AB21805,

package the x64 installer into a .intunewin file with the tool "Microsoft Win32 Content Prep Tool"
https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool

and use this for the install command:
VSCodeSetup-x64-1.57.1.exe /verysilent /norestart /mergetasks=!runcode /log="%temp%\VSCodeInstall.log"

and this for the uninstall command:
"C:\Program Files\Microsoft VS Code\unins000.exe" /verysilent /norestart

The detection method should check for file exists:
"C:\Program Files\Microsoft VS Code\Code.exe"

best,
Oliver

View solution in original post