Welcome to MSDN Blogs Sign in | Join | Help

.NET Framework Cleanup Tool User's Guide

.NET Framework Cleanup Tool User's Guide

Introduction

This .NET Framework cleanup tool is designed to automatically perform a set of steps to remove selected versions of the .NET Framework from a computer.  It will remove files, directories, registry keys and values and Windows Installer product registration information for the .NET Framework.  The tool is intended primarily to return your system to a known (relatively clean) state in case you are encountering .NET Framework installation, uninstallation, repair or patching errors so that you can try to install again.

There are a couple of very important caveats that you should review before using this tool to remove any version of the .NET Framework from your system:

  • This tool is designed as a last resort for cases where install, uninstall, repair or patch installation did not succeed for unusual reasons.  It is not a substitute for the standard uninstall procedure.  You should try the steps listed in this blog post before using this cleanup tool.
  • This cleanup tool will delete shared files and registry keys used by other versions of the .NET Framework.  If you run the cleanup tool, you will need to perform a repair/re-install for all other versions of the .NET Framework that are on your computer or they will not work correctly afterwards.

Download location

The .NET Framework cleanup tool is available for download at the following locations:

The .zip file that contains the tool also contains a file named history.txt that lists when the most recent version of the tool was published and what changes have been made to the tool over time.

Supported products

The .NET Framework cleanup tool supports removing the following products:

  • .NET Framework - All Versions
  • .NET Framework - All Versions (Tablet PC and Media Center)
  • .NET Framework - All Versions (Windows Server 2003)
  • .NET Framework - All Versions (Windows Vista and Windows Server 2008)
  • .NET Framework 1.0
  • .NET Framework 1.1
  • .NET Framework 2.0
  • .NET Framework 3.0
  • .NET Framework 3.5

Not all of the above products will appear in the UI for the .NET Framework cleanup tool on every operating system.  The cleanup tool contains logic so that if it is run on an OS version that includes the .NET Framework as an OS component, it will not offer the option to clean it up.  This means that running the cleanup tool on Windows XP Media Center Edition or Tablet PC Edition will not offer the option to clean up the .NET Framework 1.0, running it on Windows Server 2003 will not offer the option to clean up the .NET Framework 1.1 and running it on Windows Vista or Windows Server 2008 will not offer the option to clean up the .NET Framework 2.0 or the .NET Framework 3.0.

When choosing to remove any of the above versions of the .NET Framework, the cleanup tool will also remove any associated hotfixes and service packs.  You do not need to run any separate steps to remove the service pack(s) for a version of the .NET Framework.

Silent installation mode

The .NET Framework cleanup tool supports running in silent mode.  In this mode, the tool will run without showing any UI, and the user must pass in a version of the .NET Framework to remove as a command line parameter.  To run the cleanup tool in silent mode, you need to download the cleanup tool, extract the file cleanup_tool.exe from the zip file, and then run it using syntax like the following:

cleanup_tool.exe /q:a /c:"cleanup.exe /p <name of product to remove>"

The value that you pass with the /p switch to replace <name of product to remove> in this example must exactly match one of the products listed in the Supported products section above.  For example, if you would like to run the cleanup tool in silent mode and remove the .NET Framework 1.1, you would use a command line like the following:

cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 1.1"

One important note – as indicated above, the cleanup tool will not allow you to remove a version of the .NET Framework that is installed as part of the OS it is running on.  That means that even if you try this example command line on Windows Server 2003, the tool will exit with a failure return code and not allow you to remove the .NET Framework 1.1 because it is a part of that OS.

Similarly, you cannot use the cleanup tool to remove the .NET Framework 1.0 from Windows XP Media Center Edition or Windows XP Tablet PC Edition or remove the .NET Framework 2.0 or 3.0 from Windows Vista or Windows Server 2008.  In addition, if you run the cleanup tool on an OS that has any edition of the .NET Framework installed as a part of the OS, it will prevent you from using the .NET Framework - All Versions option because there is at least one version that it cannot remove.

If you are planning to run the cleanup tool in silent mode, you need to make sure to detect what OS it is running on and not pass in a version of the .NET Framework with the /p switch that is a part of the OS or make sure that you know how to handle the failure exit code that you will get back from the cleanup tool in that type of scenario.

Unattended installation mode

The .NET Framework cleanup tool supports running in silent mode.  In this mode, the tool will run and only show a progress dialog during removal, but will require no user interaction.  Unattended mode requires the user to pass in a version of the .NET Framework to remove as a command line parameter.  To run the cleanup tool in unattended mode, you need to download the cleanup tool, extract the file cleanup_tool.exe from the zip file, and then run it using syntax like the following:

cleanup_tool.exe /q:a /c:"cleanup.exe /p <name of product to remove> /u"

For example, if you would like to run the cleanup tool in unattended mode and remove the .NET Framework 1.1, you would use a command line like the following:

cleanup_tool.exe /q:a /c:"cleanup.exe /p .NET Framework 1.1 /u" 

Exit codes

The cleanup tool can returns the following exit codes:

  • 0 - cleanup completed successfully for the specified product
  • 3010 - cleanup completed successfully for the specified product and a reboot is required to complete the cleanup process
  • 1 - cleanup tool requires administrative privileges on the machine
  • 2 - the required file cleanup.ini was not found in the same path as cleanup.exe
  • 3 - a product name was passed in that cannot be removed because it is a part of the OS on the system that the cleanup tool is running on
  • 4 - a product name was passed in that does not exist in cleanup.ini
  • 100 - cleanup was able to start but failed during the cleanup process
  • 1602 - cleanup was cancelled

Log files

The cleanup tool creates the following log files:

  • %temp%\cleanup_main.log - a log of all activity during each run of the cleanup tool; this is a superset of the logs listed below as well as some additional information
  • %temp%\cleanup_actions.log - a log of actions taken during removal of each product; it will list files that it finds and removes, product codes it tries to remove, registry entries it tries to remove, etc.
  • %temp%\cleanup_errors.log - a log of errors and warnings encountered druing each run of the cleanup tool

 

Published Thursday, August 28, 2008 7:33 PM by astebner
Attachment(s): dotnetfx_cleanup_tool.zip

Comments

Friday, August 29, 2008 6:05 PM by Aaron Stebner's WebLog

# Unified .NET Framework Troubleshooting Guide

Details about the .NET Framework 2.0 setup packaging Available command line switches for .NET Framework

Friday, August 29, 2008 8:55 PM by Aaron Stebner's WebLog

# Link to .NET Framework Cleanup Tool User's Guide

I have posted several items on my blog in the past about the .NET Framework cleanup tool.&#160; The information

Wednesday, November 26, 2008 4:05 PM by 97% Fully Blizzlike Wotlk Repack - Page 15 - AC Web

# 97% Fully Blizzlike Wotlk Repack - Page 15 - AC Web

Tuesday, December 02, 2008 4:38 PM by Aaron Stebner's WebLog

# Updated .NET Framework cleanup and verification tools to fix 32-bit registry logic on 64-bit Windows

While helping out a customer a few weeks ago, we discovered that the .NET Framework cleanup tool and

Tuesday, December 02, 2008 6:04 PM by Microsoft .net Framework cleanup tool | Trucchetti.com

# Microsoft .net Framework cleanup tool | Trucchetti.com

Friday, January 02, 2009 5:57 AM by Akshay's Weblog

# Problems installing ASP.NET 1.1 on Windows 2008

Windows Vista and Windows 2008 comes with .NET framework 2.0 installed by default along with the operating

Saturday, January 17, 2009 12:41 PM by WPF mit VS 2008 und SP1 | hilpers

# WPF mit VS 2008 und SP1 | hilpers

Wednesday, January 28, 2009 8:08 PM by Microsoft .Net Framework | keyongtech

# Microsoft .Net Framework | keyongtech

Friday, January 30, 2009 3:49 AM by Fixing TurboTax BootStrapper Setup Failed | tek-works.com

# Fixing TurboTax BootStrapper Setup Failed | tek-works.com

Tuesday, February 03, 2009 5:07 AM by Net Framework problem | hilpers

# Net Framework problem | hilpers

Sunday, February 08, 2009 6:34 PM by Error installing .Net v3.5 SP1 &laquo; Mobile PC

# Error installing .Net v3.5 SP1 &laquo; Mobile PC

Saturday, February 28, 2009 7:54 PM by Aaron Stebner's WebLog

# Automated cleanup tool to remove the .NET Framework 1.0, 1.1, 2.0, 3.0 and 3.5

I have posted an updated version of the .NET Framework cleanup tool that now contains support for automatically

# Windows Update: Fehlercode 643 - Seite 2 - drwindows.de

Tuesday, March 03, 2009 5:46 PM by Aaron Stebner's WebLog

# Removal tool to fix .NET Framework install failures

I wrote an application late last year that is designed to clean up computers that have problems getting

Friday, March 06, 2009 2:58 PM by group manager error

# group manager error

Thursday, March 19, 2009 10:26 PM by Aaron Stebner's WebLog

# More detailed steps to fix .NET Framework install errors that ask for tmpXXXX.tmp

I previously described a set of steps in this blog post that can be used to manually remove the .NET

# Aaron Stebner's WebLog : Updated: what to do if other .NET Framework setup troubleshooting steps do not help

# cplusn.com &raquo; Blog Archive &raquo; R??gler les probl??mes d&#8217;installation du framework .NET 3.5

Tuesday, April 14, 2009 6:14 AM by coukou

# re: .NET Framework Cleanup Tool User's Guide

May you please RE-upload the tool.

Can't download it entirely :( (only 94K).

Regards

Tuesday, April 14, 2009 2:30 PM by astebner

# re: .NET Framework Cleanup Tool User's Guide

Hi Coukou - The download link is working fine for me, so I'm not sure why you're only able to download a partial copy of this file.  I've also uploaded it to a secondary location in case this will help for you.  You can find the tool at one of the following locations:

http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip

http://blogs.msdn.com/astebner/attachment/8904493.ashx

# Outil de suppression pour corriger les échecs d’installation .NET Framework | MarocTechie

Thursday, April 30, 2009 12:55 PM by jacob.hoover

# re: .NET Framework Cleanup Tool User's Guide

I was wondering if there would be any issues if we wanted to host the Cleanup and Verifier tool on our own site for our customers. We deployed a .net 2.0 application and lately several have been having issues getting them to run. (Much hate for the corrupt 2.0 framework installs.)

Thanks

Thursday, April 30, 2009 7:05 PM by astebner

# re: .NET Framework Cleanup Tool User's Guide

Hi Jacob.Hoover - I don't see any major issues with you doing that assuming that you've read and agree to the license agreement that is included with each of these tools.  The one caveat I want to mention is that I update the tools on my file servers when I make bug fixes and feature enhancements, so if you take copies of these tools and host them elsewhere, they may get out of sync with the latest version.  You may want to periodically check for updates on my blogs and refresh the copies of the files that you're hosting.

Wednesday, May 06, 2009 12:25 PM by Ruminations from the Expression Web support team

# Known causes for Expression Web 2 installation crashes

Tired of trying to install Expression Web 2 over and over again only to have the installation crash with

Monday, May 25, 2009 3:13 AM by Errore .NET - Pagina 3

# Errore .NET - Pagina 3

Monday, June 08, 2009 7:57 AM by basiaw7

# Porządki

Czasami coś wygląda dobrze, a tak na prawdę jest dobrze bo do końca nie zdajemy sobie sprawy jak jest

Thursday, June 18, 2009 7:56 AM by <Jose A. Fernandez />

# .NET Framework Cleanup Tool

Joven&hellip;, t&uacute; que estas entre los 15 y 55 a&ntilde;os &hellip; y la instalaci&oacute;n del

Thursday, June 18, 2009 9:55 AM by Jose A. Fernandez

# .NET Framework Cleanup Tool

Joven&hellip;, t&uacute; que estas entre los 15 y 55 a&ntilde;os &hellip; y la instalaci&oacute;n del

# Automated cleanup tool to remove the .NET Framework 1.0, 1.1, 2.0, 3.0 and 3.5 | SnakeBytez

Wednesday, June 24, 2009 5:21 PM by PHPfrog

# re: .NET Framework Cleanup Tool User's Guide

Wish I ran across this a couple days ago.

Thanks so much, worked like a charm!

Used on a system with Vista Ultimate SP2.

Anonymous comments are disabled
 
Page view tracker