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
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 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx]
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:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz110] "1"="C:\\Install\\DirectX9b\\dxsetup.exe /opk" "@="DirectX 9b"
Dot NET Framework v1.1
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz120] "1"="C:\\Install\\netframework\\netfx.msi /QB" @="Dot NET Framework v1.1"
MSN Messenger 6
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz130] "1"="C:\\Install\\MSN\\MsnMsgs.msi /QB" @="MSN Messenger 6"
Windows Media Player 9
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz140] "1"="C:\\Install\\WMP9\\wmp9.exe /Q:A /R:N" @="Windows Media Player 9"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz150] "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.
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)
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zzXXX] "1"="C:\\Install\\hotfixes\\hotfixes.cmd" @="Hotfixes Update"
Remember to change the XXX to the correct number e.g.110
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.
CLS @echo off ECHO. ECHO Installing NVIDIA Video Card Drivers 45_23... start /wait %systemdrive%\install\NVIDIA_4523\Setup.exe -s -f1"%systemdrive%\install\NVIDIA_4523\setup.iss" ECHO.
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.
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz120] "1"="C:\\Install\\InstallShield.cmd" @="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;
CLS @echo off ECHO. ECHO Deleting Temp Installation Files... RD /S /Q %systemdrive%\install RD /S /Q %systemdrive%\Drivers ECHO.
Then add this to your setup.reg as the second but last file to run;
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz270] "1"="C:\\Install\\Remove2.cmd" @="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.
CLS @echo off ECHO. 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.
[COMMANDS] ".\install.cmd" ".\user.cmd"
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:
CLS @echo off ECHO. ECHO Adding Windows Update Method REGEDIT /S %systemdrive%\install\Setup.reg ECHO.
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:
CLS @echo off ECHO. ECHO Adding User... ECHO Please Wait... net user USERNAME /add net localgroup "administrators" USERNAME /add ECHO.
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:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx] "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, 23 November 2003 - 03:37 PM.