Jump to content

Microsoft .NET Framework 1.1 to 3.5 SP1 with Hotfixes - nLite RunOnce


JakFrost

Recommended Posts

I've been looking for an easy and maintainable way to install the Microsoft .NET Framework 1.1 to 3.5 SP1 and the Hotfixes. I must have read a half-a-dozen threads and seen various Add-On packages and scripts like SNM to get the packages to work but all of the solutions listed in the threads required major work to repackage your own downloads or relied on downloading someone else's repackaged files. I wanted a solution to use only the original source files downloaded from Microsoft but also to supply the correct switches to them to make the install automatic. I also wanted the process to be super easy to implement and maintain. I found the solution after a day or two of trial and error and I like this solution the most out of all the ones that I've read about.

Basically, you just use nLite Unattended section's RunOnce list to add all the command lines with silent install switches. You also take the downloaded files and put them into an Install folder inside your image build folder.

I actually have my installation create a non-privilaged User account that gets automatically logged on always, so on the first logon after the install I just Log Out and logon as the Administrator account to ensure that the RunOnce commands are executed.

The whole process works well and it is easy to implement and maintain. Most importantly it doesn't require repackaging the original source files. I can easily add additional hotfixes to the Install folder and just add an additional command to the RunOnce section as required.

"%SOURCE%Install\Microsoft .NET Framework 1.1.exe" /C:"install.exe /Q" /Q
"%SOURCE%Install\Microsoft .NET Framework 1.1 SP1.exe" /Q /I
"%SOURCE%Install\Microsoft .NET Framework 1.1 SP1 KB928366-X86.exe" /Q /I
"%SOURCE%Install\Microsoft .NET Framework 3.5 SP1.exe" /passive /norestart
"%SOURCE%Install\Microsoft .NET Framework 3.5 SP1 KB958484-x86.exe" /passive /norestart
"%SOURCE%Install\Microsoft .NET Framework 3.5 SP1 KB963707-x86.exe" /passive /norestart
"%SOURCE%Install\Microsoft .NET Framework 2.0 SP2 KB958481-x86.exe" /passive /norestart
"%SOURCE%Install\Microsoft .NET Framework 3.0 SP2 KB958483-x86.exe" /passive /norestart

 Directory of D:\nLite\WinXP\INSTALL

08/14/2009 06:10 AM <DIR> .
08/14/2009 06:10 AM <DIR> ..
08/11/2009 03:53 AM 9,249,736 Microsoft .NET Framework 1.1 SP1 KB928366-X86.exe
08/24/2008 02:43 PM 10,703,680 Microsoft .NET Framework 1.1 SP1.exe
08/08/2003 03:10 PM 24,265,736 Microsoft .NET Framework 1.1.exe
08/11/2009 03:41 AM 8,981,856 Microsoft .NET Framework 2.0 SP2 KB958481-x86.exe
08/11/2009 03:41 AM 7,256,928 Microsoft .NET Framework 3.0 SP2 KB958483-x86.exe
03/01/2009 02:03 AM 1,424,736 Microsoft .NET Framework 3.5 SP1 KB958484-x86.exe
08/11/2009 03:35 AM 759,144 Microsoft .NET Framework 3.5 SP1 KB963707-x86.exe
08/24/2008 04:52 PM 242,743,296 Microsoft .NET Framework 3.5 SP1.exe

The good thing about this is also that other programs and hotfixes from Microsoft can be put into the Install folder and executed with silent switches without having to repackage them or create SVCPACK files. Many programs support /q or /s switches for silent installations also.

I know that some folks prefer to have their programs installed at the T-13 interval or with RunOnceEx and I understand the benefits of both and also how to implement them but for sheer simplicity the RunOnce way seems to be easiest to implement and maintain, as long as you don't mind the Command Prompt pop-up window (I don't).

Enjoy this solution. I just wanted to share it out there.

Link to comment
Share on other sites


I am doing pretty much the same thing ;-)

I did not rename the files though and I have arranged the files in different directories.

BTW: it seems you missed one update for 1.1 SP1: NDP1.1sp1-KB886903-X86.exe

Here's my GUIRunOnce:

[GuiRunOnce]
@ECHO OFF
ECHO Applying Registry Tweaks...
REGEDIT /S %Systemdrive%\HKLM.REG
DEL %systemdrive%\HKLM.REG
REGEDIT /S %Systemdrive%\HKUD.REG
DEL %Systemdrive%\HKUD.REG
REGEDIT /S %Systemdrive%\HKCR.REG
DEL %Systemdrive%\HKCR.REG
REGEDIT /S %Systemdrive%\TotalCommander.reg
DEL %systemdrive%\TotalCommander.reg
ECHO Installing .NET Framework 1.1
START /WAIT %Source%!INSTALL\DOTNET11\DOTNETFX.EXE /C:"install.exe /Q" /Q
ECHO Installing .NET Framework 1.1 SP1
START /WAIT %Source%!INSTALL\DOTNET11\NDP1.1sp1-KB867460-X86.exe /Q /I
ECHO Installing .NET Framework 1.1 SP1 Hotfixes
START /WAIT %Source%!INSTALL\DOTNET11\NDP1.1sp1-KB886903-X86.exe /Q /I
START /WAIT %Source%!INSTALL\DOTNET11\NDP1.1sp1-KB928366-X86.exe /Q /I
ECHO Installing .NET Framework 2.0, 3.0 and 3.5 incl. SPs
START /WAIT %Source%!INSTALL\DOTNET35\dotnetfx35sp1.exe /passive /norestart
ECHO Installing .NET Framework 2.0, 3.0 and 3.5 incl. SPs hotfixes
START /WAIT %Source%!INSTALL\DOTNET35\KB959209\NDP20SP2-KB958481-x86.exe /passive /norestart
START /WAIT %Source%!INSTALL\DOTNET35\KB959209\NDP30SP2-KB958483-x86.exe /passive /norestart
START /WAIT %Source%!INSTALL\DOTNET35\KB959209\NDP35SP1-KB958484-x86.exe /passive /norestart
START /WAIT %Source%!INSTALL\DOTNET35\NDP35SP1-KB963707-x86.exe /passive /norestart
ECHO All done. Initiating system restart.
SHUTDOWN.EXE -r -f -t 60 -c "Your system will restart in 60 seconds..."
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY%\085 /VE /D "Cleaning Up and Rebooting" /f
REG ADD %KEY%\085 /V 1 /D "%Systemdrive%\CLEANUP.CMD" /f

Any clue how to get rid of the random temp dir left behind by the installer in the %Systemdrive% directory?

Thanks.

Edited by Csimbi
Link to comment
Share on other sites

Any clue how to get rid of the random temp dir left behind by the installer in the %Systemdrive% directory?

Thanks.

I usually do that kind of things with ccleaner, and have it scheduled to execute regularly.

Link to comment
Share on other sites

Any clue how to get rid of the random temp dir left behind by the installer in the %Systemdrive% directory?

Thanks.

I usually do that kind of things with ccleaner, and have it scheduled to execute regularly.

Right. What I mean is: immediately, after the installation of .NET and its updates. We know it's going to be there, but we don't know its name.

Link to comment
Share on other sites

Ok, I had enough of looking at that rubbish left behind.

To remedy this issue, I made a generic script that will locate a directory with the specified files (max 6 can be specified) under it.

I attached this script. You should put it to a directory specified in %PATH%.

Start the script without parameters (or, insufficient parameters), and you will get the help.

Start the script with the right parameters, and you get what you wanted.

It gives no other output than the help, so you can call it silent.

Now, back to the .NET framework rubbish.

Invoke said script like this:

@DIR_LOC.CMD "%SystemDrive%" "RD /S /Q " "amd64\filterpipelineprintproc.dll" "i386\filterpipelineprintproc.dll"

And the rubbish will be gone.

Have a nice day.

PS.

I wonder if it should be a separate topic; could be quite useful for other matters, too.

DIR_LOC.CMD

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...