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 the .NET Framework 4

Silent install, repair and uninstall command lines for the .NET Framework 4

Rate This

I have previously posted command lines that can be used to install, repair and uninstall the versions of the .NET Framework in silent mode and unattended mode.  Now that the .NET Framework 4 has shipped, I wanted to post an equivalent set of steps to install, repair and uninstall the .NET Framework 4 Client Profile and Full.

The .NET Framework 4 uses a different setup chainer than in previous versions of the .NET Framework.  As a result, the command lines are somewhat different than in previous releases.  There are also a few differences in how the repair and uninstall processes work that I wanted to call out specifically:

  • There are different repair and uninstall command lines for 32-bit and 64-bit versions of the .NET Framework 4
  • The .NET Framework 4 includes both a client profile and a full version.  Uninstalling the full version requires 2 steps – one to uninstall the extended component and another to uninstall the client profile.

.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

.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 

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

 

  • Hi Ganton - Are these files being reported as missing by the .NET Framework verification tool?  If so, those should be listed as warnings and not errors, and it should be safe to ignore any reports about those files being missing from your computer.  Do you still see errors related to the .NET Framework 4 after uninstalling it and re-installing it on your computer?  If so, what are the exact errors?

  • Hi Aaron, thanks for being so helpful, but i've managed to fix the problem - Windows hadn't been installing the right updates.

  • Yes i got those files as waring.And i still got error.And here is link for SS.See post where it say "Evo SS." and click the picture.www.bug.hr/.../101799.aspx

  • Sorry for double post but i am not geting any updates for net framework on windows update.Maybe thats the problem?

  • Hi Ganton - If you are having problems getting .NET Framework updates, then you might be running into the issue that I described at blogs.msdn.com/.../10110053.aspx.  To confirm that, can you check and see what the version number is for the file mscoree.dll on your computer?

  • Hi Aaron-my mscoree.dll wont updtae to 4.0.So what shall i do?Shall i re-install windows 7 ?

  • Hi Ganton - I'd suggest trying the System Update Readiness Tool that is linked in that other blog post.  If that doesn't help, then the only way I know of to solve this type of issue is to repair/re-install Windows.

  • I've created a custom bootstrapper using the custom bootstrapper generator and have tried all forms  of /q /passive and no matter what I get the security warning for the dotnetfx_full_x86_x64.exe. Is there any way to bypass this dialogue?

  • Hi Command Arguments the same for use with custom bootstrapper - What version of the bootsrapper and Visual Studio are you using?  There is a built-in bootstrapper package for the .NET Framework 4 in Visual Studio 2010, so I'd suggest using that if possible.

    If you're using a pre-2010 version of Visual Studio, then I'm not sure it is going to be possible to suppress that security warning.  If it is the one that I'm thinking of, it is the elevation prompt on Windows Vista and Windows 7.  Silent install command line switches do not allow you to bypass that type of warning (because otherwise, any malware and virus could install themselves behind the scenes by doing things like that).  Instead, it is up to the calling process to make sure that it has elevated permissions before trying to run a child process that requires elevation.

  • Not sure if my post made it in... so I will send it again.  I am wondering about installing .Net 3.5 on a machine that already has .Net 4.0 installed.  Should I uninstall 4.0 first and then reinstall after installing 3.5 or is it OK to install 3.5 with 4.0 already installed?

    Thanks,

  • Hi Randy - The .NET Framework 4 is designed to allow you to install it and run it side-by-side with other versions of the .NET Framework.  There is no need to uninstall the .NET Framework 4 before trying to install the .NET Framework 3.5.

  • Sometimes you want to show a user progress (so they don't turn it off) but nto let them cancel it.

    For msi's you can use /qb! instead of just /qb

    I can't find a way to do this with dotnet4 or its updates!

  • Hi Unattended without cancel button - There is not a way to do that with teh .NET Framework 4 installer.  If you need to suppress the cancel button in your scenarios, you will have to write your own wrapper UI and use a technique like the one at technet.microsoft.com/.../ff859983 to register for progress messages.

  • Hi, Aaron -- thanks much for posting this.

    SUMMARY:  Where can we get NetFx_DTP.msi?  

    This is the file that "Repair" is asking for, when attempting to

    repair "Microsoft .NET Framework 4 Multi-Targeting Pack",

    from within control panel / programs / programs and features / right-click, "Repair".

    I searched my hard disc (on a Server 2008 system) for "net*.msi", and searched the install discs for Windows Server 2008, Visual Studio 2008, and Visual Studio .NET, but do not see this file, that control panel's "Repair" is asking for.

    Thanks much,

    -- Doug Ivison

  • Hi Doug_Ivison - The multi-targeting pack is installed as a part of Visual Studio 2010.  If it is complaining about a missing MSI file, you might need to uninstall that component and then repair Visual Studio 2010 to get the multi-targeting pack to successfully repair on your computer.

Page 6 of 7 (102 items) «34567
Leave a Comment
  • Please add 1 and 3 and type the answer here:
  • Post