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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

%windir%\Microsoft.NET\Framework64\v4.0.30319\SetupCache\v4.5.51209\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> 

<update date=”1/14/2015″> Added information about .NET Framework 4.5.2 install, repair and uninstall. </update>

Comments (55)

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

  2. Uni-can says:

    And how can I do an unattentended install of dot4?

  3. astebner says:

    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.

  4. Joe says:

    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 = "\steelersdcolPolaris4.0dotNetdotNetFx40_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

  5. astebner says:

    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.

  6. MarcusUA says:

    Greetings!

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

  7. astebner says:

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

  8. senthil says:

    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?

  9. astebner says:

    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.

  10. ben says:

    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?

  11. astebner says:

    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.

  12. RightStuff says:

    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.

  13. astebner says:

    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.

  14. Rochelle says:

    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

  15. astebner says:

    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.

  16. Nicholas A. Shake says:

    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

  17. astebner says:

    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!

  18. JHON says:

    CUALES SON LOS PRINCIPALES COMANDOS DEL NET FRAMEWORK??

  19. astebner says:

    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.

  20. mregan@ncc.nsw.gov.au says:

    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

  21. astebner says:

    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.

  22. DD says:

    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 🙂

  23. astebner says:

    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.

  24. Andrew Johnson says:

    .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.

  25. 187 says:

    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?

  26. astebner says:

    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.

  27. The Carter says:

    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

  28. astebner says:

    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?

  29. The Carter says:

    Thanks for the quick reply!

    yea I have used the /? command and it shows up with a list of switches… q/ is one of them. It just ignores it though. So I have to sit for like an hour to do all 7 updates.

    It is a security patch.

    NDP40-KB2736428-x64.exe is one of the ones…

  30. The Carter says:

    So a sample of my batch file is pretty simple. I changed the path name for security reasons…

    <patch.cmd>  (created a txt file then changed the extension)

    setlocal

    set PATHTOFIXES="c:Desktop"

    %PATHTOFIXES%NDP40-KB2736428-x64.exe /q /norestart

    %PATHTOFIXES%NDP40-KB2742595-x64.exe /q /norestart

    echo Please Reboot

    PAUSE

    This works extremely well when I patch Windows 7 or Office 2010… But for some reason the .NET WILL NOT silent install…. Drives me nuts!

    Hopefully that helps a little.

  31. The Carter says:

    So I just tried running one of the updates by itself in the Admin CMD with the "/passive /promptrestart" switches and it worked.. But when I change the cmd file that I put above to the new switches it did not work. It prompted me to accept EULA… Any Idea why?

  32. astebner says:

    Hi The Carter – That's strange.  I don't know how to explain that behavior.  Maybe the quotes around PATHTOFIXES is causing some kind of parameter parsing problem for these hotfixes or something like that?  If you create a script that just contains something like this, does it work?

    c:desktopNDP40-KB2736428-x64.exe /q /norestart

    Also, can you take a look and see if there are any log files created in %temp% from the attempted silent install that shows UI to see if the command line switches are being passed in correctly?

    Finally, just to confirm, are you launching patch.cmd with elevated privileges?

  33. Marko says:

    Hi, I don't know where else to ask:

    I want/need to install .net 4 or 4.5 "passive" so I start it with "/passive /norestart".

    This works fine if it's not installed already. But when it's already installed, it starts to repair the existing installation (and downloading everything again, because I use the web installer).

    Is there an option to prevent it from doing so?

  34. astebner says:

    Hi Marko – If you don't want the repair process to download packages again, you'll need to use the full installer instead of the web installer.  If you don't want the .NET Framework installer to launch the repair process at all, you'll need to add logic to your installer to check to see if the .NET Framework is already installed and skip running it if so.

    You can find instructions for detecting the presence of the .NET Framework in the deployment guides, and I've also posted example source code at blogs.msdn.com/…/9763379.aspx.

  35. Hossein says:

    Hi. Thanks for this. But how can I do this with visual basic 2012. I made an app that only works with .NET 4. 🙁 how can i install it when my application starts. Thank you

  36. astebner says:

    Hi Hossein – You will likely need to create an installer that will install the .NET Framework 4 and then install your application.  You can find some information about how to do that in the .NET Framework 4 deployment guide for application developers at msdn.microsoft.com/…/ee942965(v=vs.100).aspx.

  37. Mario says:

    What does is the "/x86 /x64 /ia64 /parameterfolder Client"  options of the unattended .NET Framework 4 Client Profile (64-bit) repair do?  I assume it needed but.net deployment guide doesn't list them in the options.  Thank you

  38. astebner says:

    Hi Mario – Those switches tell the .NET Framework installer which edition and processor architectures to attempt to repair or uninstall.

    I'm not sure why they decided not to list them in the deployment guides, but I am guessing that they decided to emphasize the most common redistribution scenario (silent install) and skip the repair/uninstall scenarios because they typically aren't required by apps that redistribute the .NET Framework.

  39. DrewB says:

    I have a Windows server 2008 32bit standard running IIS and serving a couple of apps. .Net currently installed are v. 1.1, 3.5 sp1, and 4.5.1

    Due to a compatibility issue with a vendor app, I need to roll back 4.5.1 to v 4.0.  My first attempt using add/remove programs left the server incapable of loading windows normally.  I restored the snapshot and began researching alternative methods.

    Any advice on the most efficient way to revert 4.5 .Net to 4.0?

  40. astebner says:

    Hi DrewB – The .NET Framework 4.5.1 is a full replacement for the .NET Framework 4.  The only way to revert from 4.5.1 back to 4 is to uninstall 4.5 and then re-install 4.  There shouldn't be anything in the uninstall process for the .NET Framework 4.5.1 that causes Windows to fail to load though.

    Does it work if you uninstall 4.5.1 and re-install 4 without rebooting in between?

  41. DrewB says:

    Hello Aaron,  

    I know I'm looking at a rip/replace approach with 4, I was blindsided by the server's failure to load the UI. I know there are situations in Server 2012 that require you to reload powershell and the UI (blogs.technet.com/…/removing-net-framework-4-5-4-5-1-removes-windows-2012-2012r2-ui-and-other-features.aspx) but I didn't expect similar with 2008 STD.

    I have another change window this evening and will try the /noreboot option then.  Thank you for your quick reply!

  42. DrewB says:

    Aaron – just wanted to let you know that removal and re-installation without a reboot in between was successful.  .Net 4.5.1 unloaded and .Net 4.0 loaded without issue.

  43. Loren Gordon says:

    Fantastic info, thanks!

    fyi, for .NET 4.5.2, here is the path to Setup.exe:

    %windir%Microsoft.NETFramework64v4.0.30319SetupCachev4.5.51209Setup.exe

    -Loren

  44. James says:

    This is an excellent document thank you so much for making my life a little easier..

    5 stars.

  45. Denis Nikolli says:

    Hello Aaron , this is what i need %windir%Microsoft.NETFramework64v4.0.30319SetupCachev4.5.51209Setup.exe  But i dont know what to do with it..Please help

  46. astebner says:

    Hi Denis Nikolli – What exactly are you trying to do?  Can you please describe your scenario in more detail and I'll see if I can help from there?

  47. Sasi says:

    Hi All,

    I'm looking for .bat file to install .dotnet repair tool exe file to all the servers please let me know your inputs as well

  48. Hi Sasi – The most recent version of the .NET Framework repair tool includes command line switches that allow you to run in unattended or silent modes.  You can find instructions for how to do that in the knowledge base article at support.microsoft.com/…/2698555.

  49. Excellent Article. says:

    Thanks for this beautiful article. It save my time.

  50. Julius says:

    Hey Arron – thanks for keeping this site up to date!

    Are you willing to shed some light on two questions?

    1) When running the .NET 4.6 installer (NDP46-KB3045557-x86-x64-AllOS-ENU.exe) via the SCCM Application Model, it fails and the decompression log shows errors similar to the following:

    Error 0x80004005: Failed to extract all files out of box container #0.

    Error 0x80004005: Failed to extract

    Exiting with result code: 0x80004005

    From what I've seen, this behavior has existed for some time.

    The workaround is to extract (q /extract:tempdirectory) then run setup.exe with the appropriate switches (/q /norestart /chainingpackage "ADMINDEPLOYMENT" /log "somepath.htm" etc).

    Is that specific 'problem' going to get resolved?  I realize the TechNet documentation says to create a package ( msdn.microsoft.com/…/ee390831(v=vs.110).aspx ) but I prefer to deploy .NET using the Application Model so that it can be defined as a prerequisite for other applications.

    2) What do the /x86 /x64 and /ia64 switches do with regards to installs, uninstalls and repairs?  I'm having a hard time finding documentation on purpose and appropriate use cases.

    Thanks for considering

  51. Hi Julius – I'm not sure whether or not this SCCM extraction failure is a known issue and/or if the .NET Framework setup team is planning a fix in the future.  I'd recommend posting a question on the .NET Framework setup forum to see if someone there has any additional information about that scenario – social.msdn.microsoft.com/…/home.

    The switches control which architecture-specific payload gets installed during .NET Framework setup.  For example, on an x64 version of Windows, .NET Framework setup will install both the x86 and the x64 payload, whereas on an x86 version of Windows, .NET Framework setup will only install the x86 payload.

  52. Frank Jr Molley says:

    Im installing net framework 4.5.2 to play Magic Online on my Dell 6400 inspiron with OS Windows Vista 32-bit but the installation setup bar starts over again and keeps doing this over and over its not stopping and no other notifications are coming up to say anything’s wrong. Whats goin in here?

    1. Hi Frank Jr Molley – I’m sorry for the hassle that this issue is causing for you. Can you please use the tool described at http://blogs.msdn.com/astebner/archive/2007/11/21/6458047.aspx to collect all of your setup log files, upload the file named %temp%\vslogs.cab that this tool will create to a file server (such as http://onedrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?