How to perform a silent repair and uninstall of the .NET Framework 3.5 and 3.5 SP1
Question:
I have seen your blog posts that describe how to silently repair and uninstall the following versions of the .NET Framework:
- .NET Framework 1.0
- .NET Framework 1.1
- .NET Framework 2.0
- .NET Framework 2.0 SP1 and 3.0 SP1
- .NET Framework 2.0 SP2 and 3.0 SP2
- .NET Framework 3.5
How can I perform a silent repair and uninstall for the .NET Framework 3.5 SP1?
Answer:
The following list provides example command lines that can be used to repair and uninstall the MSI-based .NET Framework 3.5 SP1 package after it has been installed on the system. The silent option will perform the repair/uninstall with no UI displayed to the user. The unattended option will perform the repair/uninstall with only a progress dialog, but with no user interaction required.
.NET Framework 3.5 SP1 - silent repair
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /q /norestart
.NET Framework 3.5 SP1 - unattended repair
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /qb /norestart
.NET Framework 3.5 SP1 - silent uninstall
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /q /uninstall /norestart
.NET Framework 3.5 SP1 - unattended uninstall
"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5 SP1\setup.exe" /qb /uninstall /norestart
Important notes about repair scenarios:
- The .NET Framework 3.5.1 (an updated version of the .NET Framework 3.5 SP1) is installed as an OS component on Windows 7. As a result, the MSI-based versions of 3.5 or 3.5 SP1 cannot be installed on these OS's, and the above command lines will not work on these OS's. If you need to repair the .NET Framework 3.5.1 on Windows 7, you will need to use instructions like the ones in this blog post.
- On Windows XP and Windows Server 2003, the .NET Framework 3.5 SP1 repair process will chain the repair processes for the .NET Framework 2.0 SP2 and the .NET Framework 3.0 SP2, so there is no need to use separate steps to repair those products if you are going to repair the .NET Framework 3.5 SP1 on these OS's.
- On Windows Vista and Windows Server 2008, the .NET Framework 2.0 and 3.0 are OS components, and the repair of the .NET Framework 3.5 or 3.5 SP1 will not repair these OS components. If you need to repair the .NET Framework 2.0 and/or 3.0 on Windows Vista or Windows Server 2008, you will need to use instructions like the ones in this blog post.
Important note about uninstall scenarios:
- The .NET Framework 3.5 SP1 uninstall process will only uninstall the .NET Framework 3.5 SP1 MSI. It will not uninstall the .NET Framework 2.0 SP2 or the .NET Framework 3.0 SP2 products because there may be other applications on the system that rely on those versions of the .NET Framework. If you want to uninstall the .NET Framework 2.0 SP2 and 3.0 SP2, you must uninstall in the following order: .NET Framework 3.5 SP1, then .NET Framework 3.0 SP2 then .NET Framework 2.0 SP2.
Other important notes:
- Log files will be created for the .NET Framework 3.5 SP1 repair and uninstall just like for the initial install. You can find a list of .NET Framework 3.5 and 3.5 SP1 log files in this blog post.
- When calling .NET Framework 3.5 SP1 setup in silent or unattended mode, you should check the return code from the setup.exe process in order to determine success or failure. Return code 0 means that the setup was successful, return code 3010 means that the setup was successful but a reboot is required to complete the setup and any other return code means that there was an error. If you receive a 3010 return code, the reboot is required before all .NET Framework functionality will be expected to function correctly on the user's system, so it cannot be deferred forever.
- The above examples only demonstrate the command lines used for repair and uninstall. For install scenarios, I recommend reviewing the content in the .NET Framework 3.5 deployment guides as well as the steps for creating administrative install points.
Comments
Anonymous
March 08, 2009
.NETASP.NETRoutingperformancecomparetoHttpHandlerLINQonObjectsPerformanceWhy...Anonymous
March 08, 2009
.NET ASP.NET Routing performance compare to HttpHandler LINQ on Objects Performance Why My ASP.NET Application'sAnonymous
March 09, 2009
Thank you for submitting this cool story - Trackback from DotNetShoutoutAnonymous
June 10, 2009
The comment has been removedAnonymous
June 11, 2009
The comment has been removed