For a lot of applications today you’ll need to install the Microsoft .NET Framework on your Windows systems to get them working. If you’re one of the administrators around the world that hasn’t made the jump to Windows Vista yet then you’ll know that the .NET Framework 2.0 doesn’t come pre-installed with Windows XP.
Here’s a simple script to perform a completely unattended installation of the Microsoft .NET Framework 2.0 and then update it to the .NET Framework 2.0 Service Pack 1. Note that the commands below will prevent the machine being worked on from restarting automatically after installing the service pack. The commands also assume you’ve got your .NET Framework installation files located in C:\InstallationFiles – change the location in the commands below if that’s not the case (it almost definitely won’t be!).
:: Install the .NET Framework 2.0 echo Installing .NET Framework 2.0 ... echo. "C:\InstallationFiles\dotnetfx.exe" /q:a /c:"install.exe /qb!" :: Install the .NET Framework 2.0 SP1 echo Installing .NET Framework 2.0 SP1 ... echo. "C:\InstallationFiles\NetFx20SP1_x86.exe" /qb /norestart |
At the time of writing this article the Microsoft .NET Framework 2.0 and .NET Framework 2.0 SP1 files can be downloaded from the links below.
Microsoft .NET Framework 2.0 Redistributable x86 (dotnetfx.exe)
Microsoft .NET Framework 2.0 Service Pack 1 x86 (NetFx20SP1_x86.exe)
Hi there,
Do you know the code to install .Net Framework 3.5 w/ Sp1. I searched all over the net but can’t find the right codes. Thanks.
Hi Hieu,
Yes, when you have downloaded the .NET Framework 3.5 SP1 *full file* (not the small web setup version) simply run the following command. This will run a silent install that does not reboot at the end of the installation. Note that not rebooting can cause some software deployment packages to show a failed result if not they aren’t configured properly (e.g. Altiris Deployment Server).
Here is the command:
start /wait dotnetfx35.exe /passive /norestart
You can run the executable file without the “start /wait” part if you want to but this is how you would run it from a batch/command script.
You can download the full .NET Framework 3.5 with SP1 package from http://www.microsoft.com/downloads/details.aspx?familyid=ab99342f-5d1a-413d-8319-81da479ab0d7&displaylang=en.
Hope that helps.
i thought the NetFX20SP1_x86.exe was all cumulative (meaning you don’t have to install the 2.0 donetfx.exe first).
http://www.microsoft.com/Downloads/details.aspx?familyid=79BC3B77-E02C-4AD3-AACF-A7633F706BA5&displaylang=en
You’re right, it is cumulative. However, I found that odd issues occurred when I installed the cumulative version without installing the original version first.
The script above just reflects what I did to ensure there are no odd issues, especially with IIS, after installing the .NET Framework.
For what it’s worth though I don’t even install version 2.0 anymore – I simply run a single silent install of .NET Framework 3.5. You don’t need anything else.
3.5 sp1 is already available. Can we just install that framework without installing the 3.5 or do you stil getting problems?
Hi Michael,
You can install the .NET Framework 3.5 SP1 as a single install without installing 2.0, 3.0 or 3.5 before it – the SP1 full package release is incremental. Here are some links for you (I would recommend getting the full package).
*Full* package of the .NET Framework 3.5 SP1 (~231MB).
.NET Framework 3.5 SP1 bootstrapper (online install) (~2.8MB – requires an internet connection to get the rest of the required files).
What about the three hot fixes they said to install afterward’s? (NDP20SP2,NDP30SP2, NDP35SP1)? Are they needed?
Paul: Considering the relative age of .NET 2.0 I’d highly recommend using .NET 3.5 now unless you have a production reason not to. .NET 3.5 SP1 includes full support for .NET 2.0 as well as numerous security enhancements, bug fixes etc, not to mention (obviously) support for applications developed using .NET 3.0 and 3.5. However, as with all Microsoft patches/software it’s highly recommended to make sure you run Windows Update (or Microsoft Update, depending on your site) after installing anything new.
If you do go with .NET Framework 3.5 please make sure you install the version that includes SP1 – see » this article « for instructions on how to perform an unattended install.