Forum Discussion
newtotechcom-J
Sep 17, 2023Brass Contributor
Unable to uninstall Visual Studio Pro 2022 via Intune
Hi, I'm able to install Visual Studio Pro 2022 but unable to uninstall it via Intune. Following are the commands that I'm using: Install command vs_Professional.exe --nocache --wait --noUpda...
- Sep 19, 2023
newtotechcom-J I Installed it using your install command. I used this as the uninstall string, which also removes the Visual Studio installer after uninstalling Visual Studio Pro 2022:
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" /uninstall --passive
It does, however, leave the CoreEditorFonts installed. You can put the command above and this one below in one uninstall.cmd and use that as uninstall string:
MsiExec.exe /X{1851460E-0E63-4117-B5BA-25A2F045801B} /qn
Your initial uninstall string didn't work because it needed a space behind the Installpath before specifying the --quiet option
Sep 22, 2023
Did this work for you?
newtotechcom-J
Sep 23, 2023Brass Contributor
The commands that you shared should I try that in intune?
As the commands that I shared in the post, are working on the command prompt but no visa intuune.
- Sep 23, 2023Yes, put with the installer from the URL you mentioned in a folder together with a uninstall.cmd containing both of the uninstall command lines I mentioned. Create a intunewin package from that with my install command line for installation and the uninstall.cmd for uninstall. For detection you can use a file exist for C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe
- newtotechcom-JSep 23, 2023Brass Contributor
Should I use just this command:
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" /uninstall --passive
or Should use just this command:
MsiExec.exe /X{1851460E-0E63-4117-B5BA-25A2F045801B} /qn
or Should I have them both together like this in uninstall command as shown in snapshot?
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" /uninstall --passive ; MsiExec.exe /X{1851460E-0E63-4117-B5BA-25A2F045801B} /qn- Sep 23, 2023You need both uninstall commands, one is for Visual Studio, and the other one is for CoreEditorFonts. Just add them to an uninstall.cmd file, one line per command, and package uninstall.cmd and vs_Professional.exe from one directory to a .intunewin package. The install command is vs_Professional.exe --nocache --wait --noUpdateInstaller --noWeb --quiet --norestart and the uninstall command is uninstall.cmd.
- newtotechcom-JSep 23, 2023Brass ContributorThank you for sharing this and I'll try it out.
Also, if I want to update the visual studio code from the older version to the one that we have in the link.
What command should I use?- Sep 23, 2023Let us know and visual studio code? You're installing visual studio pro now, visual studio code is different and updates itself. Not sure if you need Admin rights for that....