Aaron Stebner's WebLog

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

Silent install, repair and uninstall command lines for each version of the .NET Framework

Silent install, repair and uninstall command lines for each version of the .NET Framework

Rate This
  • Comments 44

I often get asked about how to perform silent and unattended installs for various versions of the .NET Framework.  In order to hopefully make things easier to find going forward, I decided to create a single blog post with information about silent and unattended installs, repairs and uninstalls for each shipping version of the .NET Framework.

The command lines listed in this blog post do not apply to versions of the .NET Framework installed as a part of the OS.  You can refer to this blog post for a list of which version of the .NET Framework ships with which version of Windows.

Note - if you try to repair or uninstall the .NET Framework and setup fails, you can try to use the .NET Framework Repair Tool to solve the problem.

.NET Framework 1.0 product family

.NET Framework 1.0 - silent repair

dotnetfx.exe /q:a /c:"msiexec.exe /fpecmsu netfx.msi REBOOT=ReallySuppress /l*v %temp%\netfx10_repair_log.txt /qn"

Note – repairing the .NET Framework 1.0 requires re-downloading the dotnetfx.exe installer and running the command line using this installer.

.NET Framework 1.0 - unattended repair

dotnetfx.exe /q:a /c:"msiexec.exe /fpecmsu netfx.msi REBOOT=ReallySuppress /l*v %temp%\netfx10_repair_log.txt /qb"

Note – repairing the .NET Framework 1.0 requires re-downloading the dotnetfx.exe installer and running the command line using this installer.

.NET Framework 1.0 - silent uninstall

msiexec /x {B43357AA-3A6D-4D94-B56E-43C44D09E548} REBOOT=ReallySuppress /qn /l*v %temp%\netfx10_uninstall_log.txt

Note - this command line varies depending on what language version of the .NET Framework 1.0 you have installed.  The product code listed above corresponds to the English version of the .NET Framework 1.0, so you will need to use the appropriate non-English product code in order to uninstall non-English versions of the .NET Framework 1.0.

.NET Framework 1.0 - unattended uninstall

msiexec /x {B43357AA-3A6D-4D94-B56E-43C44D09E548} REBOOT=ReallySuppress /qb /l*v %temp%\netfx10_uninstall_log.txt

Note - this command line varies depending on what language version of the .NET Framework 1.0 you have installed.  The product code listed above corresponds to the English version of the .NET Framework 1.0, so you will need to use the appropriate non-English product code in order to uninstall non-English versions of the .NET Framework 1.0.

.NET Framework 1.1 product family

.NET Framework 1.1 - silent repair

dotnetfx.exe /q:a /c:"msiexec.exe /fpecmsu netfx.msi REBOOT=ReallySuppress /l*v %temp%\netfx11_repair_log.txt /qn"

Note – repairing the .NET Framework 1.1 requires re-downloading the dotnetfx.exe installer and running the command line using this installer.

.NET Framework 1.1 - unattended repair

dotnetfx.exe /q:a /c:"msiexec.exe /fpecmsu netfx.msi REBOOT=ReallySuppress /l*v %temp%\netfx11_repair_log.txt /qb"

Note – repairing the .NET Framework 1.1 requires re-downloading the dotnetfx.exe installer and running the command line using this installer.

.NET Framework 1.1 - silent uninstall

msiexec /x {CB2F7EDD-9D1F-43C1-90FC-4F52EAE172A1} REBOOT=ReallySuppress /qn /l*v %temp%\netfx11_uninstall_log.txt

.NET Framework 1.1 - unattended uninstall

msiexec /x {CB2F7EDD-9D1F-43C1-90FC-4F52EAE172A1} REBOOT=ReallySuppress /qb /l*v %temp%\netfx11_uninstall_log.txt

.NET Framework 2.0 product family

.NET Framework 2.0 - silent repair

%windir%\Microsoft.NET\Framework\v2.0.50727\install.exe /q

.NET Framework 2.0 - unattended repair

%windir%\Microsoft.NET\Framework\v2.0.50727\install.exe /qb

.NET Framework 2.0 - silent uninstall

%windir%\Microsoft.NET\Framework\v2.0.50727\install.exe /u /q

.NET Framework 2.0 - unattended uninstall

%windir%\Microsoft.NET\Framework\v2.0.50727\install.exe /u /qb

.NET Framework 2.0 SP1 - silent repair

msiexec /i {B508B3F1-A24A-32C0-B310-85786919EF28} REBOOT=ReallySuppress /l*v %temp%\netfx20sp1_repair_log.txt /qn

.NET Framework 2.0 SP1 - silent uninstall

msiexec /x {B508B3F1-A24A-32C0-B310-85786919EF28} REBOOT=ReallySuppress /l*v %temp%\netfx20sp1_uninstall_log.txt /qn

.NET Framework 2.0 SP2 - silent repair

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

.NET Framework 2.0 SP2 - unattended repair

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

.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 2.0 SP2 - unattended uninstall

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

.NET Framework 3.0 product family

.NET Framework 3.0 - silent repair

“%windir%\Microsoft.NET\Framework\v3.0\Microsoft .NET Framework 3.0\setup.exe” /q /f /norestart

.NET Framework 3.0 - unattended repair

“%windir%\Microsoft.NET\Framework\v3.0\Microsoft .NET Framework 3.0\setup.exe” /qb /f /norestart

.NET Framework 3.0 - silent uninstall

“%windir%\Microsoft.NET\Framework\v3.0\Microsoft .NET Framework 3.0\setup.exe” /q /remove /norestart

.NET Framework 3.0 - unattended uninstall

“%windir%\Microsoft.NET\Framework\v3.0\Microsoft .NET Framework 3.0\setup.exe” /qb /remove /norestart

.NET Framework 3.0 SP1 - silent repair

msiexec /i {2BA00471-0328-3743-93BD-FA813353A783} REBOOT=ReallySuppress /l*v %temp%\netfx30sp1_repair_log.txt /qn

.NET Framework 3.0 SP1 - unattended repair

msiexec /i {2BA00471-0328-3743-93BD-FA813353A783} REBOOT=ReallySuppress /l*v %temp%\netfx30sp1_repair_log.txt /qb

.NET Framework 3.0 SP1 - silent uninstall

msiexec /x {2BA00471-0328-3743-93BD-FA813353A783} REBOOT=ReallySuppress /l*v %temp%\netfx30sp1_uninstall_log.txt /qn

.NET Framework 3.0 SP1 - unattended uninstall

msiexec /x {2BA00471-0328-3743-93BD-FA813353A783} REBOOT=ReallySuppress /l*v %temp%\netfx30sp1_uninstall_log.txt /qb

.NET Framework 3.0 SP2 - silent repair

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

.NET Framework 3.0 SP2 - unattended repair

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

.NET Framework 3.0 SP2 - silent uninstall

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

.NET Framework 3.0 SP2 - unattended uninstall

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

.NET Framework 3.5 product family

.NET Framework 3.5 - silent repair

"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5\setup.exe" /q /norestart

.NET Framework 3.5 - unattended repair

"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5\setup.exe" /qb /norestart

.NET Framework 3.5 - silent uninstall

"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5\setup.exe" /q /uninstall /norestart

.NET Framework 3.5 - unattended uninstall

"%windir%\Microsoft.NET\Framework\v3.5\Microsoft .NET Framework 3.5\setup.exe" /qb /uninstall /norestart

.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

 .NET Framework 4 product family

.NET Framework 4 Client Profile (32-bit) – silent repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

.NET Framework 4 Client Profile (32-bit) – unattended repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /passive /norestart

.NET Framework 4 Client Profile (32-bit) – silent uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /q /norestart

.NET Framework 4 Client Profile (32-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /passive /norestart

.NET Framework 4 Client Profile (64-bit) – silent repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

.NET Framework 4 Client Profile (64-bit) – unattended repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /passive /norestart

.NET Framework 4 Client Profile (64-bit) – silent uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /q /norestart

.NET Framework 4 Client Profile (64-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /passive /norestart

.NET Framework 4 Full (32-bit) – silent repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

.NET Framework 4 Full (32-bit) – unattended repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /passive /norestart

.NET Framework 4 Full (32-bit) – silent uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Extended\setup.exe /uninstall /x86 /x64 /ia64 /parameterfolder Extended /q /norestart

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /q /norestart

.NET Framework 4 Full (32-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Extended\setup.exe /uninstall /x86 /x64 /ia64 /parameterfolder Extended /passive /norestart

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /passive /norestart

.NET Framework 4 Full (64-bit) – silent repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /q /norestart

.NET Framework 4 Full (64-bit) – unattended repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /repair /x86 /x64 /ia64 /parameterfolder Client /passive /norestart

.NET Framework 4 Full (64-bit) – silent uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Extended\setup.exe /uninstall /x86 /x64 /ia64 /parameterfolder Extended /q /norestart

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /q /norestart

.NET Framework 4 Full (64-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Extended\setup.exe /uninstall /x86 /x64 /ia64 /parameterfolder Extended /passive /norestart

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\Client\setup.exe /uninstall /x86 /x64 /parameterfolder Client /passive /norestart

 .NET Framework 4.5 product family

.NET Framework 4.5 (32-bit) – silent repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\setup.exe /repair /x86 /x64 /ia64 /q /norestart

.NET Framework 4.5 (32-bit) – unattended repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\setup.exe /repair /x86 /x64 /ia64 /passive /norestart

.NET Framework 4.5 (32-bit) – silent uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\setup.exe /uninstall /x86 /x64 /q /norestart

.NET Framework 4.5 (32-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\setup.exe /uninstall /x86 /x64 /passive /norestart

.NET Framework 4.5 (64-bit) – silent repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\setup.exe /repair /x86 /x64 /ia64 /q /norestart

.NET Framework 4.5 (64-bit) – unattended repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\setup.exe /repair /x86 /x64 /ia64 /passive /norestart

.NET Framework 4.5 (64-bit) – silent uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\setup.exe /uninstall /x86 /x64 /q /norestart

.NET Framework 4.5 (64-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\setup.exe /uninstall /x86 /x64 /passive /norestart

.NET Framework 4.5.1 (32-bit) – silent repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\v4.5.50938\setup.exe /repair /x86 /x64 /ia64 /q /norestart

.NET Framework 4.5.1 (32-bit) – unattended repair

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\v4.5.50938\setup.exe /repair /x86 /x64 /ia64 /passive /norestart

.NET Framework 4.5.1 (32-bit) – silent uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\v4.5.50938\setup.exe /uninstall /x86 /x64 /q /norestart

.NET Framework 4.5.1 (32-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework\v4.0.30319\SetupCache\v4.5.50938\setup.exe /uninstall /x86 /x64 /passive /norestart

.NET Framework 4.5.1 (64-bit) – silent repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.50938\setup.exe /repair /x86 /x64 /ia64 /q /norestart

.NET Framework 4.5.1 (64-bit) – unattended repair

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.50938\setup.exe /repair /x86 /x64 /ia64 /passive /norestart

.NET Framework 4.5.1 (64-bit) – silent uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.50938\setup.exe /uninstall /x86 /x64 /q /norestart

.NET Framework 4.5.1 (64-bit) – unattended uninstall

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.50938\setup.exe /uninstall /x86 /x64 /passive /norestart

<update date="5/13/2010"> Added information about .NET Framework 4 install, repair and uninstall. </update>

<update date="6/1/2010"> Fixed incorrect command lines for uninstall of the .NET Framework 4 extended. </update>

<update date="5/26/2011"> Added a missing /norestart parameter to the .NET Framework 4 Full (64-bit) - silent uninstall command line. </update>

<update date="4/22/2014"> Added information about .NET Framework 4.5 and 4.5.1 install, repair and uninstall. </update>

<update date="4/30/2014"> Added a link to the .NET Framework Repair Tool. </update> 

  • Issues with Net-framework.  As I got into the Command Prompt I could only find NetFx4-Advsrvs , is was enabled, then underneath I have NetFx4 Extended=ASPNET 45, saying dissabled. Im in a real pickle. I have other issues as well with windows 8. Which I can explain later. I dont have the windows 8CD its a comsumer copy I overright windows 7. Trouble reading from the DVD drive. so If I can just fix the net framework issue first that be great help. Thankyou.....

    Feature Name : NetFx4-AdvSrvs

    State : Enabled

    Feature Name : NetFx4Extended-ASPNET45

    State : Disabled

  • Hi Rochelle - Here are the steps that I suggest for this type of error:

    1.  Install the latest Windows service pack if you haven't yet.  Since you are using Windows 8, you can skip this step because there aren't yet any service packs available for it (as of the time that I'm writing this comment in December 2012).

    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.

    If none of the above help, you might need to repair/re-install Windows to fix this type of error.  It might also help to post a question on one of the Windows forums to see if someone there has any additional suggestions for you to try before you resort to re-installing Windows.

  • In the Deployment Guides (for 3.5), I cannot find the "Silent Install" commands. And I cannot find any other information on it from this computer (heavy firewall and weird configurations).

    Please get back at me Brother.

    - Nicholas A. Shake

  • Hi Nicholas A. Shake - The silent install options for the .NET Framework 3.5 setup package are documented in the deployment guide at msdn.microsoft.com/.../cc160716(v=vs.90).aspx.  You'll probably be most interested in reading the instructions in that guide for the /q and /norestart command line switches.  Hopefully this helps!

  • CUALES SON LOS PRINCIPALES COMANDOS DEL NET FRAMEWORK??

  • Hi JHON - What exactly do you want to do with the .NET Framework installer?  The most commonly used commands (silent install, silent uninstall) are listed above in this blog post and/or in the .NET Framework deployment guides.  If you have any specific questions or problems with any of these commands, please let me know.

  • Hi John,

    Is there a way to detect when .NET needs to be repaired?

    I find my self in the position of potentially needing to deploy .NET v2.0 repairs organisation wide and would like to limit my scope somewhat.

    Cheers,

    Mick

  • Hi mregan - No, there isn't a reliable way to determine whether or not a given version of the .NET Framework needs to be repaired.  If you need to deploy a solution to an entire organization, I'd suggest detecting which version(s) of the .NET Framework are installed on each computer and then triggering a repair for each of them.

  • Is there a way to avoid the repair if .NET is installed already without writing another script or program to check this?  Something like: dotNetFx40_Full_setup.exe /check_first_before_taking_a_long_time_downloading_net_when_its_already_installed_and_not_broken :-)

  • Hi DD - No, there is not that type of command line switch for the .NET Framework setup.  The closest thing I know if is the repair tool that I described in more detail at blogs.msdn.com/.../10359320.aspx.

  • .NET Framework v4.5:  I've been using the same as for .NET v4 but omitting the "/parameterFolder" argument.  I also prefix the whole lot with "start /wait " so I can capture the return code.

  • is there a way to run an uninstall of .net 1.1 on a list of machines? I have to hit over 100 workstations and was wondering what would be the best way to tackle the ordeal?

  • Hi 187 - I don't know of any ways to do this type of thing other than to create a script that does an automated uninstall and then schedule a task to run on each of the computers in your network to execute the script on each individual computer.  I've also seen some network administrators solve this type of problem by creating a new base OS image without the .NET Framework 1.1 installed and deploying the new base image to their network.  That is much more invasive though so I'm not sure that'll be an option for you.

  • Hey Man,

    I am trying to run some .NET 4.0 patches on some workstations at work after a re-image. I cannot seem to get it to silent install... I have used the /q switch and it still makes me accept the EULA and follow the wizard. I am trying to do it on multiple workstations but it just ignores the switch. Plus, they take FOREVER to install. I dont get it.

    I run batches of MS security patches and I try to do the same with .NET 4.0 patches by placing the path in a .cmd file... It works great for the MS patches, but when I go to run the .NET batch, it makes me hit accept and next on all of them. I have it set up like so:

    <filename.exe> /q /norestart

    and I have also tried

    <filename.exe> /passive /norestart

    It just ignores the "/q" switch. This is taking TOO much time to install them all. I think there is about 7 of them.

    Can you help me out???

    Thnx

    CS

  • Hi The Carter - All .NET Framework patches should support the /q and /norestart switches for silent installs.  What exact patches are you trying to install that you are seeing those switches not work?  If you run them with the /? switch, are the /q and /norestart switches listed there?

Page 2 of 3 (44 items) 123
Leave a Comment
  • Please add 1 and 1 and type the answer here:
  • Post