• 43,603 views Dec 21, 2006

    This is part of my series on How to Install Windows Applications Silently.

    Microsoft’s .NET Framework 3.0 is now available. You’ll likely need it for compatibility with software that also needs to talk to Microsoft’s Windows Vista. If you deploy lots of applications, you’ll probably want a silent way to install it, which is what this article is about.
    You’ll first need to download Microsoft .NET Framework 3.0 Redistributable Package from www.microsoft.com/downloads/details.aspx?familyid=10CC340B-F857-4A14-83F5-25634C3BF043&displaylang=en. The file is called dotnetfx3setup.exe, and has the following command line switches:

    • /q – UI is entirely suppressed
    • /remove – Uninstalls product
    • /f – Repairs a product. This will repair all components that are installed.
    • /norestart – Never restart option. The installer never restarts the computer after the installation. Setup will still return 3010 if a reboot is required.

    As of 12pm CST on 12/19/06 there are no Windows Updates for .Net3.

    Microsoft notes that “For best results, install on a computer that has not had pre-release versions of Microsoft .NET Framework 3.0 installed on it. If your computer has a pre-release version on it, follow the Uninstall Instructions below to uninstall these pre-release bits before installing the Microsoft .NET Framework CTP. You must remove them in the correct order to ensure a clean uninstall.” There is a special download that can remove the beta software for you, see the end of the post for a detailed view of how it works.

    Silently Installing .Net3

    A silent install of .NET 3 is quite simple. Create a text file called install.bat in the same folder as the dotnetfx3setup.exe file and add the following code to it:
    @ECHO OFF
    ECHO Installing DotNet 3

    start /wait dotnetfx3setup.exe /q /norestart

    exit

    The batch file is very basic. The first two lines turn off echo, so it doesn’t show every single thing that happens on the screen, and then add the text to tell you what is installing. The next line is of course the main one. The start /wait part tells the script to wait until this part is done before moving on to the next part. Their isn’t a next part at this time, but soon their will be hotfixes for .NET3, and you’ll want to add them to your script, and of course you’ll want the script to wait until each part is finished before proceeding. Finally, the script ends with an exit to tell the window to close.

    Here’s the screens you’ll be missing if you run your install silently:

    Extra Stuff

    When hotfixes become available, you can download them and add them to this script. Simply add the hotfix download to the same directory as the install.bat file, and add the following line before the exit line, but after the line for the main install:
    start /wait filename.exe /q
    Replace the filename.exe part with the actual name of the file you downloaded (will probably look something like NDP30-KB12345-X86.exe).

    Uninstalling Beta and RC Software

    If you had a beta or RC version of .NET 3 installed previously, you will need to remove it first (the installer will stop if it detects an older version, as shown in the image below).

    Microsoft has instructions on how to do this manually, but they’ve also created an application called Pre-released Microsoft .NET Framework 3.0 Uninstall Tool to do it for you. You can download it at www.microsoft.com/downloads/details.aspx?FamilyId=AAE7FC63-D405-4E13-909F-E85AA9E66146&displaylang=envs_uninst_w

    The uninstaller (the filename is vs_uninst_winfx.exe) does have command line switches as well, so you could even add that to the beginning of your script to first uninstall the old version, then install the new one:

    • /Q – Quiet modes for package
    • /T: – Specifies temporary working folder
    • /C – Extract files only to the folder when used also with /T
    • /C: – Override install command defined by author

    So, if you added start /wait vs_uninst_winfx.exe /Q before the main line in your script, it should uninstall the old version first before installing the new one (I don’t have the old version of the software anymore so I can’t test this).

    If you run it normally, here’s the screens you will see:

  • 14 Responses

    WP_Modern_Notepad
    • Marcelo Says:

      I just test it and it works great. Thanks a lot!!!

    • Joe Says:

      Well, I run the install dotnetfx3setup.exe by double clicking the exe and I get the first screen accepting the license, but I never see anything else again… Task Manager perfomance tab show activity for some time but the nothing. Im on W2K3. If I run it again I get the Repair or Remove dialog, I select repair: same results.
      What do I do now?

    • Joe Says:

      It sounds as if it’s already installed if it asks to ‘repair or remove’. Not sure if it’s intended for W2K3, you’d have to check the download page to be sure.

    • Jim Says:

      About how long does the install take if I’m upgrading from 2.0? I’d just like to know how long I can expect my server to be down. Thanks.

    • Joe Says:

      Technically it’s not an upgrade, you can have .NET 1.1, 2 & 3 all installed at the same time. It’s been a while since I did an install, but I don’t recall it taking more than a few minutes. I would think you could do the install while the server is running, so your only downtime would be for the reboot.

    • sklein Says:

      You should download dotnetfx3.exe (about 50 MByte) for an offline installation.

    • Joe Says:

      Do you have a link to where it is available? I just browsed the Microsoft downloads and was unable to locate it.

    • Javed Says:

      Here is a direct link for the .NET Framework 3.0 Redistributable Package. Both links tested & working.

      X86 Redist Package
      http://go.microsoft.com/fwlink/?LinkId=70848

      X64 Redist Package
      http://go.microsoft.com/fwlink/?LinkId=70849

    • chienquang Says:

      oh, thanks alot, this is which i need.

    • Vick Says:

      I have installed .Net 3 and its extensions.
      But i also want to keep on creating application in .Net 2 .
      Is that possible???
      ‘Coz now its only showing options for WPF and other applications…

    • so Says:

      how can i have an offline download of .net3 framework?

    • Adey Says:

      I am trying to install 1.1, 2 & 3 consecutively from the same batch file. a.a & 2 install fine but 3 doesn’t appear. Any ideas?
      Here is my batch file:
      @ECHO OFF

      ECHO ( 1 of 5 ) Microsoft .NET Framework 1.1 is installing..

      Start /Wait dotnetfx.exe /Q /C:”install.exe /Q”

      start /wait NDP1.1sp1-KB867460-X86.exe /q
      start /wait NDP1.1sp1-KB886903-X86.exe /q

      ECHO ( 2 of 5 ) Microsoft .NET Framework 2 is installing..

      start /wait dotnetfx.exe /q:a /c:”install.exe /q”

      start /wait NDP20-KB917283-X86.exe /q
      start /wait NDP20-KB922770-X86.exe /q

      ECHO ( 3 of 5 ) Microsoft .NET Framework 3 is installing..

      start /wait dotnetfx3setup.exe /q /norestart

      ECHO ( 4 of 5 ) Microsoft .NET Framework 3 patches installing..

      start /wait WindowsXP-KB925720-x86-ENU.exe /q
      start /wait msxml6-KB927977-enu-x86.exe /q

      ECHO ( 5 of 5 ) Microsoft Updates installing..

      start /wait windowsxp-kb892130-enu-x86_7e1189ce89fb0c693cad6432a4c2f982dcea49a0.exe /q
      start /wait Windows-KB890830-V1.33.exe /q

      exit

      Thanks

    • Tony Says:

      Jak siÄ™ ma .NET 3.0 do:
      - Pakiet zbiorczy aktualizacji programu CardSpace (KB925720)
      - Aktualizacja zabezpieczeń Microsoft XML Core Services 6.0 (KB927977)
      - Narzędzie Malicious Software Removal Tool (KB890830-V1.33)
      - Windows Genuine Advantage Validation Tool (KB892130)

    • Gibjab Says:

      im trying to get rid of .net framework 2.0 and 3.0 ive deleted 1.1 but i cant get rid of the others i keep getting this message : Cannot uninstall .net framework 3.0 because it will effect other installed programs any ideas?

    Leave a Comment

    Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.