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> 

  • PingBack from http://www.anith.com/?p=29558

  • PingBack from http://asp-net-hosting.simplynetdev.com/silent-install-repair-and-uninstall-command-lines-for-each-version-of-the-net-framework/

  • Interesant&iacute;sima entrada la que he visto en el blog de Aaron Stebner y que comparto con vosotros

  • And how can I do an unattentended install of dot4?

  • Hi Uni-can - You will need to use the /passive command line switch (instead of the /q switch) to perform an unattended install of the .NET Framework 4.  This is documented in the .NET Framework 4 deployment guide at msdn.microsoft.com/.../ee942965(v=VS.100).aspx as well.

  • Hi, I was wondering if you could tell me how the exit code works?

    I'm using vbscript to do the install using the following:

    cmd = "\\steelers\dcol\Polaris\4.0\dotNet\dotNetFx40_Full_x86_x64.exe /passive /norestart"

    s = objShell.run(cmd)

    If s = 0 Then

    wscript.echo("Success!")

    Else

    wscript.echo("Failed! Code: " & s)

    End If

    The exit code doesn't seem to pass on to "s" as the success message pops up before the installer starts.

    Any ideas?

    Thanks,

    Joe

  • Hi Joe - The exit code is supposed to be returned to the calling process when .NET Framework setup exits.  I don't know the exact syntax to capture the exit code in VBScript though.  It sounds like you're just getting back a return code that indicates whether or not it is able to successfully launch the process.  You'll probably need to add some logic to wait for the process to exit before continuing in your script.

  • Greetings!

    You might want to add "/norestart" to 2nd command in ".NET Framework 4 Full (64-bit) – silent uninstall"

  • Hi MarcusUA - Thank you for the heads up.  I've fixed the main blog post to add that missing /norestart switch.

  • Hi, i am trying to package the ".NET Framework 4 Full (64-bit) – unattended uninstall" using opsware, the package fails with the return code as 3010. Any idea, how to fix it?

  • Hi Senthil - Exit code 3010 doesn't mean that setup failed.  It means that setup succeeded and that a reboot is needed to finish the installation process.

  • Hi,

    Is there any difference between using "msiexec /x" & "setup /uninstall" for 3.5 SP1? msiexec looks to work to uninstall, but wondering if I'm missing something?

  • Hi Ben - Setup /uninstall is a super-set.  It will run msiexec /x on the main MSI for the .NET Framework 3.5 SP1, and it will do a few other things (stop and start services to help resolve issues we've seen in the past that caused the uninstall to fail, chain in the uninstall of language packs if any are installed on the computer, plus a couple of other things).  If you are currently running msiexec /x and not seeing any issues, you can probably just stick with that.  If you start running into any uninstall issues, you may want to switch over to using setup /uninstall though.

  • Is it just me, or are the silent install commands missing from above, leaving only repair and uninstall commands? I see this great blog post linked from several sites, yet still cannot find a way to install some of this stuff.

  • Hi RightStuff - The silent install command lines are documented in the deployment guides for each version of the .NET Framework, so instead of repeating that information here, I decided to provide the links to the deployment guides instead.  Let me know if you have any questions or run into any issues with those silent install instructions.

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