Forum Discussion
Unable to uninstall Visual Studio Pro 2022 via Intune
- 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 --passiveIt 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} /qnYour initial uninstall string didn't work because it needed a space behind the Installpath before specifying the --quiet option
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
- newtotechcom-JSep 25, 2023Brass Contributor
Harm_Veenstra
I tried the following steps, but I'm still unable to uninstall visual studio code pro-2022.- specified the following things in intuneWinAppUtil:
Please specify the source folder: C:\Test\Intune package
Please specify the setup file: vs_Professional.exe
Please specify the output folder: C:\Test\Installer
Do you want to specify catalog folder (Y/N)?N- And got the intunewin file.
- The folder: Intune package has these two files as shared in the snapshot:
uninstall.cmd and vs_Professional.exe file
The uninstall.cmd has following commands also shown in snapshot:
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" /uninstall --passiveMsiExec.exe /X{1851460E-0E63-4117-B5BA-25A2F045801B} /qn- And used the following command in intune:
Install command:vs_Professional.exe --nocache --wait --noUpdateInstaller --noWeb --quiet --norestart
Uninstall command:uninstall.cmd
- And then tried uninstalling visual studio code pro 2022 from company portal app and getting this error in intune:
Uninstall FailedThe system cannot find the file specified. (0x80070002)Please help.- Sep 25, 2023
I tested it again, and the install command and uninstall.cmd both works when running it interactively. Uploaded the intunewin app to my tenant, made it required for my test device, and installed it correctly. Then, I configured it to uninstall using the uninstall.cmd, which also works.
Then I added it to the Company Portal as Available. Installing but also uninstalling works fine...My settings:
Uninstall.cmd:"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" /uninstall --passive
MsiExec.exe /X{1851460E-0E63-4117-B5BA-25A2F045801B} /qn- newtotechcom-JSep 26, 2023Brass ContributorSo, what do you think might be the issue?
And, may I know how you got this value: 1851460E-0E63-4117-B5BA-25A2F045801B?