Solved

Remote uninstall of .NET versions on Windows XP Pro?

Posted on 2010-11-08
9
600 Views
Last Modified: 2012-05-10
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)
http://blogs.msdn.com/b/astebner/archive/2008/02/19/7805444.aspx

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!

0
Comment
Question by:davis
  • 3
  • 3
  • 3
9 Comments
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34087881
Hi,

you can try to use a VBS script from this post
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_26579009.html

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).

Regards,
Krzysztof
0
 
LVL 35

Accepted Solution

by:
Joseph Daly earned 400 total points
ID: 34094090
I used to use the GUID uninstallation approach alot in the past until i found this little trick. In my opinion it works much better.

WMIC product where name="Productname" call uninstall

The productname that you enter in the quotes should be exactly what appears in add/remove programs. Another way to tell would be to open a command prompt and type

wmic product get name

This will list every product installed you should be able to copy and paste the returned name from here as well.

This method works much better than the guid uninstall because sometime different minor versions of products will have different guids.

0
 
LVL 1

Author Comment

by:davis
ID: 34099320
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!
NETremoval.jpg
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 39

Assisted Solution

by:Krzysztof Pytko
Krzysztof Pytko earned 100 total points
ID: 34104055
Try to locate uninstall string in registry. You can delete it there.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\

Should be there key named "Microsoft .NET Framework 3.5 SP1"

There should be also uninstall string. You can check if you are able to do it manually.

Regards,
Krzysztof
0
 
LVL 1

Author Comment

by:davis
ID: 34124114
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
0
 
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34124393
I don't think so. To be able deleting HLM...\Uninstall hive you need administrative rights :/
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 34124460
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.
0
 
LVL 35

Expert Comment

by:Joseph Daly
ID: 34124474
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.
0
 
LVL 1

Author Comment

by:davis
ID: 34217056
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
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This article explains the steps required to use the default Photos screensaver to display branding/corporate images
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question