Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

.NET Framework Cleanup Tool User's Guide

.NET Framework Cleanup Tool User's Guide

Rate This

.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 .NET Framework Repair Tool and then 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.
  • Additional support can be obtained by visiting the .NET Framework setup forum at http://social.msdn.microsoft.com/Forums/en-US/netfxsetup/threads.

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 - All Versions (Windows 7)
  • .NET Framework 1.0
  • .NET Framework 1.1
  • .NET Framework 2.0
  • .NET Framework 3.0
  • .NET Framework 3.5
  • .NET Framework 4
  • .NET Framework 4.5
  • .NET Framework 4.5.1
  • .NET Framework 4.5.2

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 during each run of the cleanup tool

 

Attachment: dotnetfx_cleanup_tool.zip
  • Hi Mr. Stebner,

    I will send you the logs on onedrive. Thanks, Simon

  • .NET Utility Tool failed with the following error code: 1602*-2147467260*-2147467260*0:

  • Hi Jeff Allen - Error code 1602 typically means that setup was cancelled before it was able to complete.  I'm not familiar with the .NET Utility Tool though.  What is that tool, and what is the exact location that you downloaded and ran it from when you got this error code?

  • Hi Aaron:

    I have had a .NET problem for months.  I have Windows 8.  I can't install Office, or iLok, or do any of the fixes.  No Windows updates (4.5 etc., just freezes).  The Windows Update Standalone Installer freezes, saying "Searching for updates on this computer."  I tried the tool you posted, and it doesn't work.  I would appreciate some help.  Thanks so much.

  • Hi Andrew Manitsky - I'm not sure that any of the issues you described are related to the .NET Framework.  They could just be general problems with Windows itself.  Are you seeing any specific error messages that led you to believe that these problems are being caused by the .NET Framework?

    In the meantime, here are some steps that I typically recommend that might help in case it is a general problem with Windows:

    1.  Install the latest Windows service pack if you haven't yet. In your case, that would be Windows 8.1.

    2.  Try to run the System Update Readiness Tool from support.microsoft.com/.../947821.

    3.  Try to repair the files that are a part of your OS by using the steps listed at blogs.msdn.com/.../how-to-repair-the-net-framework-2-0-and-3-0-on-windows-vista.aspx.

  • Thanks for responding so quickly!  I believe it's a .NET Framework problem because I got error 1935 when trying to install both Office and iLok.  And with the latter, the iLok tech support concluded it was a .NET problem.

    1. The service pack will not install.

    2. 947821 doesn't work either.  It gives me Error 87.  Then I run the ? command as suggested, and the specific commands suggested aren't listed.  There are others that look like they might be useful (like Cleanup-Wim), but I didn't want to just start trying random things.

    3. I tried all of those, too.

  • Hi Andrew Manitsky - There are multiple possible root causes of 1935 errors.  The .NET Framework is one possibility, but they can also be caused by Windows itself on Windows Vista and later (see blogs.msdn.com/.../9904471.aspx for more details).  Given that you are having trouble installing Windows updates too, I suspect that this is a Windows problem as opposed to a .NET Framework problem.

    Error code 87 from the System Update Readiness Tool means that the command line was incorrect.  What is the exact command line you tried to run for the System Update Readiness Tool when you saw that error?

  • The error was from the first steps at 947821.  I tried both DISM.exe/Online/Cleanup-image/Scanhealth and DISM.exe/Online/Cleanup-image/Restorehealth and got Error: 87.

  • (continued...) the System Update Readiness Tool won't install. It freezes on "Windows Update Standalone Installer" with the message "Searching for updates on this computer..."

  • Hi Andrew Manitsky - You're getting error 87 because you need to put a space in between dism.exe and /online and in between the other command line switches.  The command line should look like this:

    dism.exe /Online /Cleanup-image /Scanhealth

    You can't install the System Update Readiness Tool on Windows 8 because the functionality in that tool is built into Windows itself starting with Windows 8.

  • Ok, I tried it with the right spacing. Both /Scanhealth  and /Restorehealth now say Error: 0x80040154. DISM failed. No operation was performed.

  • Hi Andrew Manitsky - That error code means that something isn't registered correctly on your computer, but I am not sure how to solve that type of problem other than by repairing/re-installing Windows.  Before resorting to that, I'd suggest posting a question on the Windows 8 forum at answers.microsoft.com/.../windows and see if someone there has any other suggestions that you can try first.

  • Ok, thanks Aaron Stebner.  I appreciate your efforts.

  • thanks a bunck after doing a reinstsll and pulling my hair out, you saved the day congrats

  • hello Aaron,

    I am trying to run the Clean up tool and after a certain point, it does not do anything.

    Please find the log file and let me know what I should do.

    [06/02/14,11:11:59] Process successfully launched. Waiting 60 seconds for it to complete.

    [06/02/14,11:11:59] Process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {CDC9D357-66D4-47D2-8036-19403C68B8C2}' exited with return code 0

    [06/02/14,11:11:59] Found entry {06DFD541-F304-4A86-9F0F-24B772290C74}, performing action now

    [06/02/14,11:11:59] Launching process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {06DFD541-F304-4A86-9F0F-24B772290C74}' now

    [06/02/14,11:11:59] Process successfully launched. Waiting 60 seconds for it to complete.

    [06/02/14,11:11:59] Process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {06DFD541-F304-4A86-9F0F-24B772290C74}' exited with return code 0

    [06/02/14,11:11:59] Found entry {DDCBC011-AE9A-40B0-8C8C-77A8BE460A15}, performing action now

    [06/02/14,11:11:59] Launching process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {DDCBC011-AE9A-40B0-8C8C-77A8BE460A15}' now

    [06/02/14,11:11:59] Process successfully launched. Waiting 60 seconds for it to complete.

    [06/02/14,11:11:59] Process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {DDCBC011-AE9A-40B0-8C8C-77A8BE460A15}' exited with return code 0

    [06/02/14,11:11:59] Found entry {2BE71C4B-DDFC-4782-A3A5-B8E3DA53EF1B}, performing action now

    [06/02/14,11:11:59] Launching process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {2BE71C4B-DDFC-4782-A3A5-B8E3DA53EF1B}' now

    [06/02/14,11:11:59] Process successfully launched. Waiting 60 seconds for it to complete.

    [06/02/14,11:12:00] Process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {2BE71C4B-DDFC-4782-A3A5-B8E3DA53EF1B}' exited with return code 0

    [06/02/14,11:12:00] Found entry {51E18B09-2816-4D8F-908F-7CF7ECE0F51B}, performing action now

    [06/02/14,11:12:00] Launching process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {51E18B09-2816-4D8F-908F-7CF7ECE0F51B}' now

    [06/02/14,11:12:00] Process successfully launched. Waiting 60 seconds for it to complete.

    [06/02/14,11:12:00] Process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {51E18B09-2816-4D8F-908F-7CF7ECE0F51B}' exited with return code 0

    [06/02/14,11:12:00] Found entry {30F00D74-F3A2-4512-8EAA-E14DA2F90434}, performing action now

    [06/02/14,11:12:00] Launching process 'C:\Users\user\AppData\Local\Temp\IXP000.TMP\msizapw.exe TP {30F00D74-F3A2-4512-8EAA-E14DA2F90434}' now

Page 34 of 35 (525 items) «3132333435
Leave a Comment
  • Please add 8 and 2 and type the answer here:
  • Post