Solved

Remote uninstall of .NET versions on Windows XP Pro?

Posted on 2010-11-08
9
597 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 39

Assisted Solution

by:Krzysztof Pytko
Krzysztof Pytko earned 100 total points
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 1

Author Comment

by:davis
Comment Utility
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
Comment Utility
I don't think so. To be able deleting HLM...\Uninstall hive you need administrative rights :/
0
 
LVL 35

Expert Comment

by:Joseph Daly
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Do you have users whose passwords are expiring and they are constantly calling you?  Well I sure did and needed a way to put an end to this.  We have a lot of remote users which would not be notified that their passwords were expiring since they wer…
Learn about cloud computing and its benefits for small business owners.
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…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now