Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio
All postings are provided AS IS with no warranties, and confer no rights. Additionally, views expressed herein are my own and not those of my employer, Microsoft.
Question:
I have read about the .NET Framework cleanup tool, and I would like to be able to automate running it on several systems. Does the cleanup tool support any command line switches to run it in silent mode?
Answer:
Yes, it is possible to run the cleanup tool in silent mode and unattended mode.
Running in silent mode will cause the tool to run without showing any UI. To run 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 file cleanup.ini that is included in the self-extracting package for the cleanup tool.
Running in unattended mode will cause the tool to display a progress bar during removal, but will not show any other UI and will not require the user to interact with the UI at all. After removal completes, the UI will disappear and the process will exit. To run in unattended mode, you need to use the same syntax as silent mode and add the /u command line switch in addition to the /p switch. For example:
cleanup_tool.exe /q:a /c:"cleanup.exe /p <name of product to remove> /u"
Currently, the cleanup tool includes the following product names that can be passed in using the /p switch:
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 – 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. 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 return code that you will get back from the cleanup tool in that type of scenario.
The cleanup tool returns the following exit codes:
The cleanup tool creates the following log files:
<update date="12/4/2007"> Added new product names that are supported by the latest version of the cleanup tool </update>
<update date="6/9/2008"> Added information about unattended mode and the log files produced by the cleanup tool </update>
PingBack from http://msdnrss.thecoderblogs.com/2007/09/22/mailbag-can-the-net-framework-cleanup-tool-be-run-in-silent-mode/
PingBack from http://testsubdomain.netmoviehost.com/mailbag-can-the-net-framework-cleanup-tool-be-run-in-silent-mode/
Question: I would like to try to automate the instructions for removing and reinstalling the .NET Framework
PingBack from http://blogs.msdn.com/astebner/archive/2006/05/30/611355.aspx
I've posted an updated version of the .NET Framework cleanup tool that contains the following changes:
I've posted an updated version of the .NET Framework cleanup tool that contains the following changes
PingBack from http://msdnrss.thecoderblogs.com/2007/12/04/updated-version-of-the-net-framework-cleanup-tool-that-can-remove-the-net-framework-35-rtm/
こんにちは! フォーラム オペレーターの服部清次です 今日は久々に晴天が広がり、気分爽快ですねー。 祝日が終わり、僕は、また今日から頭の中の OS を英語モードに切り替えました。 ^_^; さて、今日は久々に
Thanks a lot for your cleanup_tool.exe
Before it was the hell, it was impossible for me to update .NET Framework (it was installed again and again by Windows Update). It was also impossible to uninstall the hole .NET Famework with Windows.
I have uninstalled the hole .NET Frameword with your utility, then re installed the hole from version 1 to 3.5.
Very simple, very efficient utility.
Thanks again.