How to perform a silent repair and uninstall of the .NET Framework 2.0 SP2 and 3.0 SP2

A while back, I wrote a blog post about how to perform silent repairs and uninstalls for the .NET Framework 2.0 SP1 and 3.0 SP1.  When the .NET Framework 3.5 SP1was released last fall, it included the .NET Framework 2.0 SP2 and 3.0 SP2 behind the scenes as prerequisites.  Those packages are both slipstream updates for the 2.0 SP1 and 3.0 SP1 versions, and because of that, the command lines used to repair or uninstall them have changed.

The following list provides example command lines that can be used to repair and uninstall the MSI-based .NET Framework 2.0 SP2 and 3.0 SP2 packages after they have been installed on the system:

.NET Framework 2.0 SP2 - silent repair

msiexec /fpecmsu {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REINSTALL=ALL REBOOT=ReallySuppress /l*v %temp%\netfx20sp2_repair_log.txt /qn

.NET Framework 2.0 SP2 - silent uninstall

msiexec /x {C09FB3CD-3D0C-3F2D-899A-6A1D67F2073F} REBOOT=ReallySuppress /l*v %temp%\netfx20sp2_uninstall_log.txt /qn

.NET Framework 3.0 SP2 - silent repair

msiexec /fpecmsu {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REINSTALL=ALL REBOOT=ReallySuppress /l*v %temp%\netfx30sp2_repair_log.txt /qn

.NET Framework 3.0 SP2 - silent uninstall

msiexec /x {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7} REBOOT=ReallySuppress /l*v %temp%\netfx30sp2_uninstall_log.txt /qn

Important notes:

  • The .NET Framework 2.0 and 3.0 are installed as OS components on Windows Vista, Windows Server 2008 and Windows 7.  As a result, the MSI-based versions 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 2.0 SP2 or 3.0 SP2 on these OS's, you will need to use instructions like the ones in this blog post.
  • The .NET Framework 3.5 SP1 requires the .NET Framework 3.0 SP2 and 2.0 SP2 to be installed, so if you have the .NET Framework 3.5 SP1 installed, the above uninstall command lines will fail until you first uninstall the .NET Framework 3.5 SP1.
  • Similarly, the .NET Framework 3.0 SP2 requires the .NET Framework 2.0 SP2 to be installed, so if you have the .NET Framework 3.0 SP2 installed, the above uninstall command line for the .NET Framework 2.0 SP2 will fail until you first uninstall the .NET Framework 3.0 SP2.
  • The above examples use msiexec.exe to perform the repair and uninstall in fully silent mode.  If you choose to, you can use other supported Windows Installer command line parameters (described here and here) to perform unattended repairs and uninstalls or provide additional command line parameters to the setup processes.
  • 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 (here for 2.0 SP2 and herefor 3.0 SP2).
  • The above msiexec command lines will return exit code 0 if the command completes successfully, 3010 if the command completes successfully and a reboot is required and some other numerical value if the command failed.  You can find a list of some standard Windows Installer return codes in this knowledge base article.

<update date="1/11/2012"> Added the REBOOT=ReallySuppress property to each command line so that the computer will not automatically reboot when running these command lines if the repair or uninstall process requires a reboot. </update>


Comments (15)

  1. jelwell says:

    Will your ".NET Framework 2.0 SP2 – silent repair" example repair .NET Framework 2.0 with no service packs? Also, what about .NET 2.0 SP1?

    I was under the (possibly erroneous) impression that these distributions had unique GUIDs. Googling implied that .NET 2.0 SP1’s GUId was "B508B3F1-A24A-32C0-B310-85786919EF28".

    Similarly I found these GUIDs:

    Microsoft .NET Framework 3.0 Service Pack 1 : {2BA00471-0328-3743-93BD-FA813353A783}

    Microsoft .NET Framework 3.0 Service Pack 2: {A3051CD0-2F64-3813-A88D-B8DCCDE8F8C7}

    Microsoft .NET Framework 3.5 SP1: CE2CDD62-0124-36CA-84D3-9F4DCF5C5BD9}

    Although I did not run into a GUID for .NET 2.0 with no service packs.

    Another question. Is it ok to call the silent repair from a .NET application?

    As an example, my current .NET 2.0 application (an installer) sometimes runs into an unknown problem. I’ve found that repairing .NET 2.0 often fixes the issue. If I my application hits a snag, can I invoke repair from my .NET application? Alternatively I can return an error to my bootstrapper (which checks for a .NET 2.0 installation) and have the bootstrapper invoke the repair.


    Joseph Elwell.

  2. Hi JelWell – No, you cannot use the above command lines to repair the original version of the .NET Framework 2.0 or 2.0 SP1.  I have posted other blog posts about repairing those versions of the .NET Framework 2.0:

    2.0 original release – (this post is about uninstall, but you can remove the /u switch to perform repairs)

    2.0 SP1 –

    I’m not sure how successful you will be in trying to invoke a repair of the .NET Framework from a .NET application.  If your system is in the state where the .NET Framework will not run and needs to be repaired, I would expect your .NET application to not work too.  In that case, you won’t be able to run the code to invoke the repair.  You would probably need a native code bootstrapper to invoke this type of repair if needed.

  3. Last week, I posted a set of command line parameters that can be used to repair or uninstall the .NET

  4. Question: I have seen your blog posts that describe how to silently repair and uninstall the following

  5. mkamoski says:

    Aaron — Please help. The Framework 2 Sp 2 repair did not work for me. Windows Update keeps reporting that Microsoft .NET Framework 2.0 Service Pack 2 Update is not installed. The System Tray keeps reporting that it is not installed. The log-off prompt still says "install updates and shutdown". All this even after it installs "successfully" from the Windows Update online page. So too even after it installs from the Windows Update System Tray utility. Even after I "install updates and shutdown" at log off. I have detailed everything here. I have detailed all this here… …but I am still looking for an answer. Do you have any ideas? Please advise. Thank you. — Mark Kamoski

  6. Hi Mkamoski – I’m sorry for the hassles that this issue is causing for you.  The update in question is not the .NET Framework 2.0 SP2, it is a post-SP2 update that fixes some issues introduced in SP2.  What I’d suggest doing first is to try to go to the site for this update ( and download and attempt to install it directly from there instead of trying to install it from Windows Update.

    If that doesn’t work, then I’d suggest using the steps listed at to remove the versions of the .NET Framework from your system and then re-install the .NET Framework 3.5 SP1 (which will also install 2.0 SP2 and 3.0 SP2 for you behind the scenes).  Then, after 3.5 SP1 is installed, try again to install KB976569.

  7. Gene says:

    I need these to not reboot when complete so I'm guessed adding /norestart to the end of it should work but it doesn't appear to do so. Am I missing something?

  8. Hi Gene – Yes, I would expect /norestart to work.  Do you have a verbose MSI log from a scenario where it is not working?  You can also try to pass the property REBOOT=ReallySuppress as described on MSDN at…/aa371101.aspx to see if that helps in this scenario.

  9. csharper says:

    Thanks – this saved me a ton of frustration. All the msft KB stuff wasn't doing the trick…

  10. John A. says:

    Great instructions that I couldn't find elsewhere! One small thing I would add for dummies like me, and excuse me if I shout (I'd use red caps if I could)… THESE COMMANDS WILL RUN A SILENT INSTALL AND THEN REBOOT YOUR SERVER WITHOUT ANY FURTHER PROMPTING.

    In hindsight, had I looked more carefully I would have expected the reboot, but I leaped before I looked, and right now I'm waiting for a heavily used production server to reboot at 3:30 in the afternoon.

  11. Hi John A. – I'm very sorry about that.  I'll update the blog post to include the REBOOT=ReallySuppress property so that the calling process can control when reboots happen.

  12. Jillie K says:

    This idea of fixing Net Framework 2, is great, except that you do not leave any directions as to how to do it, and I would like to repair rather than reinstal it.

    Thank you. Jill

  13. Hi Jillie K – This blog post includes repair command lines for the .NET Framework.  You should be able to use those to repair the .NET Framework 2.0 without needing to uninstall + re-install it.  There are cases where that type of repair will fail though, and in those cases you'll likely need to uninstall + re-install instead.

  14. Cris Mooney says:

    In my case on XP SP 3 things were so messed up that nothing was able to fix or uninstall, because of missing files I believe (perhaps the result of some over zealous disk cleanup I might have done). The Microsoft ".NET Framework cleanup tool" at…/976982 was able to remove things, so those in extreme cases might give it a try.

  15. Hi Cris Mooney – Thanks for sharing this link.  I've got a blog post at…/8108332.aspx that contains a full list of tools and steps that I typically recommend for cleaning up the .NET Framework if the normal uninstall process doesn't work for some reason.

Skip to main content