Avatar of davis
davisFlag for United States of America asked on

Remote uninstall of .NET versions on Windows XP Pro?

Our organization is preparing to go-live with a web-based application that is incompatible with .NET version 3.0 or 3.5.  Approximately 60 of our Windows XP Pro machines have both .NET 3.0 SP2 and .NET 3.5 SP1 installed.  I would like to take the 'path of least resistance' and either automate the uninstall or perform the uninstall manually from cmd line (as opposed to Add/Remove Programs). I understand 3.5 will need to uninstall prior to uninstall of 3.0.   I need to ensure a seamless and thorough uninstall of BOTH, prior to 'go-live'.  I also want to make sure they don't 'come back' through Windows Updates.  The site at the link below has some good information on how to use the msiexec /x to perform uninstall via reg key.  What is the recommened strategy or 'best practice' to do so?  (Note: I have VNC access to all machines, if remote connectivity is needed)

Also, will  Automatic Updates, which are scheduled to run weekly, download and re-install these 'unneeded' .NET versions?  Thanks very much for your expert assistance!

Windows Server 2003Active Directory

Avatar of undefined
Last Comment

8/22/2022 - Mon
Krzysztof Pytko


you can try to use a VBS script from this post

Locate .NET 3.0 and 3.5 UpdateID in the Internet and use a script.
Or use my method to uninstall them in that post (you need to locate KB number for them).

Joseph Daly

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

I tried the 'WMIC' method with .NET 3.5 SP1 and it appeared to uninstall, as I do not see it in the registry or when executing 'wmic product get name' after a reboot.   However, it still displays in 'Add/Remove Programs'.  See attachment - when I click REMOVE button for the .NET 3.5 update in Add/Remove Programs a message says 'This action is only valid for products that are currently installed.  How can these orphaned entries be removed from Add/Remove programs?  thanks!
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

The VBS script kept giving me runtime errors when running.  It didn't like the part of the script and kept referencing 'objSoftware'.  However, the WMIC method works without issue when there is no additional patches installed outside the normal SP.  When there is a patch installed, as in my case with a security update for NET Framework 3.5 Service Pack 1 - (KB963707) -  the reg key needed to be deleted manually.  

Should I add the following to my script ?  If so, do I need REG.exe installed on the PC in order for it to work?  Will users with standard 'user' permissions be able to run the REG delete?  Thanks!

REG DELETE "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}.KB963707" /F
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Krzysztof Pytko

I don't think so. To be able deleting HLM...\Uninstall hive you need administrative rights :/
Joseph Daly

Regular users will not be able to delete that registry key. What about uninstalling the update before uninstalling the .net 3.5? I would just be another WMIC command.

Another option if you really wanted to use the reg key delete would be to set this to run as a computer startup script. That way it will run with system rights and be able to delete the key.
Joseph Daly

One more note. The good thing about using a second WMIC command to uninstall that service pack is that if it the service pack isnt on a specific machine the command wont cause any harm at all. It will basically just execute and see that it isnt installed and move onto the next command.
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

WMIC method works great!  Had problems with the GUID method.  I only had problems on one machine with remnant entry due to the Security update for .NET 3.5 SP1 - it needs to be removed, via sccript or manually, prior to the ,ain .NET 3.5.  thanks foe the assistance