Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Windows Update Method For An Unattended Cd

- - - - -

  • Please log in to reply
51 replies to this topic

#1
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 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.

>SP1
>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
[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:

DirectX 9b

[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"

Registry Tweaks

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

[Hotfixes]

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)

[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

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

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.

[Other]

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

Attached Files


Edited by DaveXP, 23 November 2003 - 03:37 PM.



How to remove advertisement from MSFN

#2
integer

integer

    Newbie

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

[GuiRunOnce]
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz110
"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***
"1"="C:\\Install\\IS THIS THE FOLDER NAME FOR THE APP\\IS THIS THE EXE OR MSI BEING USED FOR THE INSTALL/I HAVE NO CLUE WHAT THIS MAY BE"
@="WHAT DO I PUT HERE; ANY NAME OF THE APP I WANT TO USE"

#3
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
to us this method you do not need the [GuiRunOnce] just cmdlines.txt and yes it does increase by 10 e.g. 190, 200, 210

#4
integer

integer

    Newbie

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

[GuiRunOnce]
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx\zz110
"1"="C:\\Install\\DirectX9b\\dxsetup.exe /opk"
@="DirectX 9b"

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

#5
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
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.

#6
integer

integer

    Newbie

  • Members
  • 43 posts
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.

#7
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
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.

#8
integer

integer

    Newbie

  • Members
  • 43 posts
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.

#9
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
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.

#10
integer

integer

    Newbie

  • Members
  • 43 posts
Are these app.s and can I get a trial version or a freeware version to run and test my files with

#11
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
there are trial version going around use goolge to find it.

#12
integer

integer

    Newbie

  • Members
  • 43 posts
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....

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/mzfb"
@="MozillaFirebird"

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

#13
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
to extract yes but then it needs to be run so add another one of those to run it after it is extracted from the zip file

#14
integer

integer

    Newbie

  • Members
  • 43 posts
another what??

repeat line one

#15
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
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.

e.g.

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/mzfb"
@="Extracting MozillaFirebird"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/s"
@="MozillaFirebird"

#16
integer

integer

    Newbie

  • Members
  • 43 posts
ok we been over this and U are probally frustrated with me but I have to ask I can change

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/mzfb"
@="Extracting MozillaFirebird"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/sI CAN CHANGE THIS "s" to be "mzfb" like above right"
@="MozillaFirebird"

#17
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
do the files need to be extracted first.

if they do then you need to sets of commands if not they only need one.

e.g.

if needed to be extracted

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/extraction switch"
@="Extracting MozillaFirebird"

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/mzfb"
@="MozillaFirebird"

e.g.

if not needed to be extracted

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110
"1"="C:\\Install\\MozillaFirebird\\MozillaFirebird.exe/mzfb"
@="MozillaFirebird"

#18
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
by the way you missed out the [] on the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110

it should look like this [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Runonce\zz110]

#19
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
:) if they is anything else anyone would like me to add please let me know.

#20
devil270975

devil270975

    Advanced Member

  • Members
  • PipPipPip
  • 368 posts
@DaveXP, i think i may have figured out how to use %systemdrive%, will not give any more info untill i have got it sussed

#21
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
ok will update guide when you have made it work.

:)

#22
bjdotcom

bjdotcom

    Junior

  • Members
  • Pip
  • 59 posts
@DaveXP
For your info Slipstream Script looks to be down.

#23
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
Do Right Click>Save As Target

The Link Change just today

#24
Aaron

Aaron

    The MSFN Banana

  • Patrons
  • 5,767 posts
  • OS:Windows 7 x64
  • Country: Country Flag

@DaveXP, i think i may have figured out how to use %systemdrive%, will not give any more info untill i have got it sussed

Have you found out yet?

From what I understand, the %systemdrive% variable doesn't exist during the RunOnceEx stage, right? I've thought about making a first RunOnceEx entry to use one of those scripts that some members have used to find their CD-ROM drive letter and set the variable. I'll have to find the code, but its something like:

IF EXIST C:\Install\confirm.txt SET %SYSTEMDRIVE% C:\
IF EXIST D:\Install\confirm.txt SET %SYSTEMDRIVE% D:\
IF EXIST E:\Install\confirm.txt SET %SYSTEMDRIVE% E:\

which would go into those numbered entries in the registry file:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnceEx\001]
"1"="IF EXIST C:\Install\confirm.txt SET %SYSTEMDRIVE% C:\"
"2"="another one"
"3"="and so on"
@="Finding location of files..."

Just a theory though. (confirm.txt is just a blank txt file to confirm its existance in the Install folder)

#25
DaveXP

DaveXP

    The One

  • Members
  • PipPipPipPipPipPip
  • 1,295 posts
i dont think IF EXIST would work in a .reg file but you do have a good thery if maybe you where to set that @ the start of the .reg file instead of doing like you have, may it would work i will look up in the Windows XP Registry book to see about varibles.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users



How to remove advertisement from MSFN