SOLVED

installing visual studio code via intune

%3CLINGO-SUB%20id%3D%22lingo-sub-2475463%22%20slang%3D%22en-US%22%3Einstalling%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2475463%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIm%20struggling%20to%20install%26nbsp%3Bvisual%20studio%20code%20exe%20via%20intune!%20Any%20suggestions%20on%20how%20I%20can%20do%20this%3F%20MSIs%20are%20easy%20but%20exes%20Im%20struggling!%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2475463%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Friday%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EConditional%20Access%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Application%20Management%20(MAM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMobile%20Device%20Management%20(MDM)%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESoftware%20Management%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2475646%22%20slang%3D%22en-US%22%3ERe%3A%20installing%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2475646%22%20slang%3D%22en-US%22%3EWhat%20have%20you%20tried%3F%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20can%20either%20try%20it%20as%20a%20Line%20of%20Business%20MSI%20deployment%2C%20or%20WIn32%20application...%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2475666%22%20slang%3D%22en-US%22%3ERe%3A%20installing%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2475666%22%20slang%3D%22en-US%22%3EIm%20not%20sure%20on%20how%20to%20do%20this%20exe%20as%20a%20win32%20app%20but%20I%20do%20see%20doing%20it%20this%20way%20is%20recommended%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2475979%22%20slang%3D%22en-US%22%3ERe%3A%20installing%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2475979%22%20slang%3D%22en-US%22%3EHere%20is%20a%20good%20guide%20on%20how%20to%20take%20an%20MSI%20and%20deploy%20it%20as%20a%20Win32%20app%2C%20including%20building%20it.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.blogabout.cloud%2F2020%2F11%2F2113%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.blogabout.cloud%2F2020%2F11%2F2113%2F%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2477608%22%20slang%3D%22en-US%22%3ERE%3A%20installing%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2477608%22%20slang%3D%22en-US%22%3EI%20guess%20I%20have%20noted%20down%20some%20hints%20the%20last%20time%20I%20needed%20to%20do%20this...If%20its%20the%20runtime%2C%20why%20not%20deploying%20it%20with%20winget%20or%20chocolatey%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2479606%22%20slang%3D%22en-US%22%3ERE%3A%20installing%20visual%20studio%20code%20via%20intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2479606%22%20slang%3D%22en-US%22%3EHi%20Can%20you%20recap%20please%3F%20or%20can%20you%20please%20send%20me%20a%20link%20to%20the%20last%20time%20you%20noted%20this.%20I%20want%20to%20know%20how%20to%20deploy%20generic%20exe%20too%20so%20I%20can%20do%20this%20for%20future%20ones%20%3A)%3C%2Fimg%3E%3CBR%20%2F%3E%3CBR%20%2F%3EOh%20what%20are%20winget%20or%20chocolatey%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20in%20advance%20your%20help%20is%20always%20appreciated!!%3C%2FLINGO-BODY%3E
Super 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 (Super 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  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. :thumbs_up:
ill check it out!