Jump to content

Windows Update Method For An Unattended Cd


Recommended Posts

Windows Update Method for an Unattended CD

This guide will help you using the Windows Update Method for a Unattended XP-CD. This guide requires you to know a little bit about Unattended CD's and to have some common sense to fix some problems you may or may not have.

What this guide Covers:

>[Optional] If you have not already setup your Windows XPCD and not slipstream SP1 or SP2 and the Windows XP Roll Up

>How to make the setup.reg file with your Applications and registry tweaks

>How to install Hotfixes, InstallShield Application using batch files.

>How to remove setup files and directories from your computer after setup.

>How to Restart the computer automatically after setup is complete.

>How to add this to cmdlines.txt to run straight after setup.

>[Optional] Installing your own wallpapers, screensavers, themes, etc..

>[Optional] Adding a Custom Title to the Title Bar

[if you have not already setup your Windows XPCD and not slipstream SP1 or SP2 and the Windows XP Roll-Up]

Ok lets set-up your Windows XP Unattended CD first we need to get some stuff to make this work.

You will need SP1 or SP2 and the Windows XP Roll-Up One, also you will need your Windows XP CD-ROM the original one with know changes. After getting the above items you now need my Slipstream Script which all do all the work for you below they is a list with links to get the stuff you will need.


>Windows XP Roll-Up One

To Download the Slipstream Script please do Right Click>Save as Target

>Slipstream Script

After you have downloaded the need files and run the script next you have to setup your directories for you programs.

In the XPCD folder which was just made by the script you should have all your Windows XP files you need to create a folder called "$OEM$" and in the $OEM$ folder create another folder called "$1" and in the $1 folder create a folder called "Install". in the install folder is where you place your applications and so on.

Note! all folder must be created without the quote marks.

[Creating Setup.reg and Adding Applications]

I am now assuming that you have setup your XP-CD for an Unattended install of Windows XP and you have all your applications in the $OEM$\$1\install folder all setup and ready.

Note!! You do not need anything under the [GuiRunOnce] section of the winnt.sif if your are using the Windows Update Method and if you have your setup running from a batch file then you will know longer need the batch(s) file.

First we need to create a setup.reg file with all you programs, reg hacks etc... To do this first we use work out which program you have after that we then need to put the correct information in to the setup.reg file for it to work.

First create the file setup.reg in notepad and to make it in to a registry file do "File>Save As>setup.reg" in the $OEM$\$1\install folder then after saving it lets start adding information to make the Windows Update Work. That the top of the file put this "Windows Registry Editor Version 5.00" only the bit in blue ok that tells windows to put the information in to the Windows Registry.

Now we need to put the information in to setup the programs so under the first line which we just did put this: "[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]" (without the quote marks) this tells Windows Only to run the setup.reg information once and only once.

So a quick summary to make sure all is right so far to avoid errors. You should have saved your reg file as setup.reg in the $OEM$\$1\install folder with this in it:

Windows Registry Editor Version 5.00

Now to make your programs run we need to show the computer the path of the setup files we wish to use. Now this can be done two ways either using the CD file(s) which got copied that Windows Setup or from a Place on a different Hard Drive which never gets formatted and will always be there. Below are some of the most common programs in an unattended CD.

Program Setup Command Lines:

DirectX 9b

"1"="C:\\Install\\DirectX9b\\dxsetup.exe /opk"
"@="DirectX 9b"

Dot NET Framework v1.1

"1"="C:\\Install\\netframework\\netfx.msi /QB"
@="Dot NET Framework v1.1"

MSN Messenger 6

"1"="C:\\Install\\MSN\\MsnMsgs.msi /QB"
@="MSN Messenger 6"

Windows Media Player 9

"1"="C:\\Install\\WMP9\\wmp9.exe /Q:A /R:N"
@="Windows Media Player 9"

Registry Tweaks

"1"="regedit.exe /s C:\\Install\\regtweaks.reg"
@="Registry Tweaks"

The above will setup the programs and tweak which are bullet pointed the text in bold you can change to what ever you wish BUT the text in normal font under each bullet point must not be change unless you are installing from another hard drive in which case you can change the line "1"="C:\\Install\\WMP9\\wmp9.exe /Q:A /R:N" to "1"="D:\\Install\\WMP9\\wmp9.exe /Q:A /R:N" for example.

So to make sure you understand what is what the above text in normal text your each bullet point will make your programs install using the Windows Update method and the text in bold can be changed to fit your needs and the above text will own work for the applications which got copied from your XP-CD unless you change the path to fit your needs.

Note: Remember to make sure that registry keys are 10 apart from each other e.g. \zz150] and the next one would be \zz160] and so on. Moving on to install hotfixes (if not slipstream), InstallShield applications and how to remove setup directories and files and also how to restart the PC after setup is complete.


Download this and follow the on screen instructions and this will automatically sort and create a install list for your Hotfixes.

Download Here

This script needs to be run from the location of your CD setup on your hard drive and also this script will only work if your directory is called XPCD. You will need all type one Hotfixes and all type two Hotfixes and then place them in the correct folder which the script will create for you and that will be it apart from adding the following text to the setup.reg file. You can find all the hotfixes Here which AaronXP has put together. (Thanks to AaronXP for Listing all hotfixes in Type 1and Type two order)

@="Hotfixes Update"

Remember to change the XXX to the correct number e.g.110

[installShield Applications]

Moving on to InstallShield applications how to install. To install a InstallShield Application silently you need a setup.iss to do it as you can't put what you would put in the batch file in the registry we are going to use a batch file to install these application.

So create a batch file called InstallShield and save it with a .cmd file extension and put the follow in the batch file.

@echo off
ECHO Installing NVIDIA Video Card Drivers 45_23...
start /wait %systemdrive%\install\NVIDIA_4523\Setup.exe -s -f1"%systemdrive%\install\NVIDIA_4523\setup.iss"

Remember to change the path line to the application e.g. Change the bit after install\NVIDIA_4523\Setup.exe and the bit \NVIDIA_4523\setup.iss and the file name but that's all you should need to change.

Then add this to your setup.reg file remember to change the registry key to the correct one for your install e.g. if you have 110, 120 done then put 130 on the next one. Remember you can change the bit that says "NVIDIA Video Card Drivers 45.23" below to suit what every it is you are installing but keep it in the quote marks.

@="NVIDIA Video Card Drivers 45.23".

[Remove Setup Files]

Moving on to remove setup directory and restart the computer atomically after setup is complete.

To remove the setup directories and files it's very simple, create a batch file called remove-setup.cmd add this to the batch file;

@echo off
ECHO Deleting Temp Installation Files...
RD /S /Q %systemdrive%\install
RD /S /Q %systemdrive%\Drivers

Then add this to your setup.reg as the second but last file to run;

@="Removing Setup Files & Restarting the Computer"

Remember that you can change file name etc if you like and give things different names as I showed before this section.

[Restarting the Computer & cmdlines.txt]

To make your computer restart after the Windows Update dialog box has finished add these lines of text to the Remove2.cmd batch file and this will case the computer to restart after 1 minute and 30 seconds.

@echo off
shutdown.exe -r -f -t 90 -c "System will shutdown in 90 Seconds to Update Settings"

Now create a text file call cmdlines.txt in the $OEM$ folder and place this in it.


after doing that close and save the file and create two batch files in the $OEM$ folder one called install.cmd and the other one called user.cmd. In the batch file called install place this code:

@echo off
ECHO Adding Windows Update Method
REGEDIT /S %systemdrive%\install\Setup.reg

This will make the Windows Update method run on first boot of the machie after setup has complete. Close and save the file. In the batch file called user.cmd place this remember to put your user name where it says "USERNAME" with out the quote marks:

@echo off
ECHO Adding User...
ECHO Please Wait...
net user USERNAME /add
net localgroup "administrators" USERNAME /add

If you want more information on cmdlines.txt click the link below.

Cmdlines.txt Full Guide Thanks to GreenMachine

[installing Wallpapers, Screensavers & Themes]

To install custom Wallpapers, Screensavers, Theme and Fonts in the $OEM$ directory of your CD create a folder called $$.

XPCD\$OEM$\$$\Web\Wallpaper, Place your wallpapers in that directory and they will automatically be coped over to the Wallpaper directory.

XPCD\$OEM$\$$\System32, Place your screensavers in this folder so they automatically get coped over to the System32 folder.

XPCD\$OEM$\$$\Font, Use this folder to have custom fonts installed and automatically coped over to the Font folder in the Windows directory.

XPCD\$OEM$\$$\Resources\Themes, Use this directory to have your custom themes copied to the Themes folder automatically.

[Adding a Custom Title to the Title Bar]

To add a custom title to the title bar of your Windows Update Screens add this to the top of the setup.reg file:

"Title"="Place Text Here"

If you are going to add this to your setup.reg file please make sure that you remove or copy over this line: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx] which should already be there that the top of the setup.reg just under the "Windows Registry Editor Version 5.00" without the quote marks.


After you have finshed here you may still need to make your winnt.sif file for the i386 directory so that windows setups on its own and you may still need to setup your drivers etc... Make the Winnt.sif file | Setup Drivers


Edited by DaveXP
Link to comment
Share on other sites

I am using this in the [GuiRunOnce] section of the winnt.sif would the code appear as:



"1"="C:\\Install\\DirectX9b\\dxsetup.exe /opk"

@="DirectX 9b"

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz120***DOES THIS INCREASE BY 10 SO IT WOULD BE 190 THEN 200 AND SO ON***



Link to comment
Share on other sites

ok but I am using winnt.sif as my method so would it appear as follows:



"1"="C:\\Install\\DirectX9b\\dxsetup.exe /opk"

@="DirectX 9b"

How do I the 2nd and 3rd lines to fit my specific needs??

Link to comment
Share on other sites

this method as after as i know cannot be used the way you are trying to do i would think if it was possiable to use the winnt.sif for it, it would look like that.

C:\\Install\\DirectX9b\\dxsetup.exe /opk just change that bit to fit your needs, this bit is for the path of the files which you want to install e.g.D:\\Install\\DirectX9b\\dxsetup.exe /opk see the difference.

DirectX 9b is the bit you change to get a different name to apper on screen.

Link to comment
Share on other sites

thx but I believe it might work only because I have based my entire winnt.sif/unattended.txt off of the help file found in the xpsp1deploytools_en.cab . Then again I really have no clue what I am doing Im new to this and scripting so.

above where U have the C is that going to copy from the c drive to the cd being created or is it going to copy from the cd to the c drive during install. thx again for all the help im am sure I will have more questions as I prepare scriipts and reg files.

Link to comment
Share on other sites

the C:\ is where the setup files are loacted when setup up your programs after the install of windows is finshed so when you run setup it copys them from the CD so it is for when they are coped from the CD to the HDD to be installed after Windows Setup.

Link to comment
Share on other sites

ok thx but what do U think of my theory about the xpsp1deploytools_en.cab's REF.CHM FILE and following it as a guide do U think it will work. I could just test it but I would be using my home PC and it would really lick if it didnt work.

Link to comment
Share on other sites

i dont know about the deployment guide as i used AaronXP's guide which was great and very easy to understand but if you have be using it and thats what you think then test in BUT test it in VMWARE or VirtualPC not on your Home PC.

Link to comment
Share on other sites

When adding applications that are in compressed zip files insted of installers with there respective exe's and files such as MozillaFirebird would the code appear like....




Do I need to tell the system how to handel the the compressed files??

Is there a different method for Applications that arent in installers

Link to comment
Share on other sites

do the files need to be extracted first?

if so then you need to add a line to extract and then another lne to run setup.exe.




@="Extracting MozillaFirebird"




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