Forum Discussion
.Net Desktop Runtime uninstall
Hello,
I deployed the newest version of .Net Desktop Runtime 8.0.5 with Intune but it still leaves the old version of .Net Desktop Runtime installed. How can I uninstall it? I found some powershell scripts to uninstall the old version but they do not work. I also tried the supersedence option to replace the old version of .Net but it didn’t work. I also tried to use the uninstall tool found here. But when I run the dotnet-core-uninstall list command it doesn’t display any of the .Net Desktop Runtime versions I have installed. My goal is to automate the uninstall with Intune or a Powershell script so I don’t have to manually uninstall each version of .Net Desktop Runtime on each computer. Please help! Thank you.
- AdamB1550Copper Contributor
I had lots of fun with this exact problem, Microsoft Windows Desktop Runtime version 7.0.7 for me. Below is the PS script I came up with. You first have to uninstall all of the subcomponents, then run the EXE to remove it from Control Panel. You'll need to adjust the GUIDs in the script for your exact version. You can find the ProgramData location of the Uninstaller EXE in HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\
Invoke-Command { #Uninstall Microsoft .NET Runtime - 7.0.7 (x64) Start-Process 'msiexec.exe' -ArgumentList '/X {ECCA3DB0-6DEF-42CD-A21A-F2F7B918FB59} /quiet /norestart IGNOREDEPENDENCIES=ALL' -Wait #Uninstall Microsoft Windows Desktop Runtime - 7.0.7 (x64) DisplayVersion 56.31.61651 Start-Process 'msiexec.exe' -ArgumentList '/X {593F16DC-C2D3-4740-ABD4-A171B4E32B06} /quiet /norestart IGNOREDEPENDENCIES=ALL' -Wait #Uninstall Microsoft .NET Host FX Resolver - 7.0.7 (x64) DisplayVersion 56.31.61651 Start-Process 'msiexec.exe' -ArgumentList '/X {62A9DE14-DB7A-41D9-9D7E-ED494E6FCBAF} /quiet /norestart IGNOREDEPENDENCIES=ALL' -Wait #Uninstall Microsoft .NET Host - 7.0.7 (x64) DisplayVersion 56.31.61651 Start-Process 'msiexec.exe' -ArgumentList '/X {E914E975-A0B1-49F7-AB71-28DACD495C44} /quiet /norestart IGNOREDEPENDENCIES=ALL' -Wait #Uninstall Microsoft Windows Desktop Runtime - 7.0.7 (x64) Start-Process 'C:\ProgramData\Package Cache\{e875fc20-9a37-4344-b046-0bb037cb2d57}\windowsdesktop-runtime-7.0.7-win-x64.exe' -ArgumentList '/uninstall /quiet' -Wait }
- LarvellJonesCopper Contributor