Jump to content

Unattended XP Update CD


Recommended Posts

Hi All

Not sure if this is the right forum but it seems a logical follow up to the unattended installation.

I've just done CD for the local repair shop which updates existing XP installs in unattended mode and also includes Symantec virus removal tools.

It uses all the principles I've learnt from you kind folk here at MSFN so thanks to all who contribute to this knowledge sharing.

There's an attachment of the front end of the prog below which was written by Elihu Rozen available at E_Cat. It's very easily customisable via an .ini file so non programmers like myself will have no trouble getting around it at all.

It basically does the following things:

1. Installs XPSP1 - from a self extracting cab and driven by a batch file to install in unattended mode.

2. Installs hotfixes - basically does SVCPACK.INF (13 minute mark) installs, reboots and does RUNONCEX installs.

3. The Lot - installs SP1, reboots, installs SVCPACK.INF ,reboots, installs RUNONCEX

4. The virus removal tools run off a batch which turns off system restore, reboots and then runs the removal tool (haven't found a way yet to automatically reboot into safe mode)

The internals of this are four batch files as follows:

run.cmd - installs SP1 then calls runfirst.cmd

CLS@echo off
IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:
TITLE Windows XP SP1 
ECHO.ECHO.ECHO Over the next few minutes you will see an automated installation ECHO of Windows XP Service Pack 1a 
ECHO.ECHO Installing XP Service Pack 1aECHO Please wait...start /wait %CDROM%\Install\Svcpk\XPSP1a.exe
ECHO.ECHO Installing XP Updater to run on rebootECHO Please wait...start /wait %CDROM%\runfirst.cmd
ECHO.ECHO Restarting the PC in 60 seconds...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"
EXIT

runfirst.cmd - on reboot calls update.cmd via runonceex

@echo off
IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Updater Package" /f
REG ADD %KEY%\001 /VE /D "Windows XP Updater Package" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\update.cmd" /f
ECHO.ECHO Restarting the PC in 60 seconds...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute, this will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"
EXIT

Update.cmd - runs basically the SVCPACK.INf install then calls runonce.cmd to do do the RUNONCEX installation on the next reboot.

CLS@echo off
IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:
TITLE Windows Hotfix Update
ECHO.ECHO.ECHO Over the next few minutes you will see automated updates ECHO of Windows XP hotfixes that will bring your computer up to dateECHO as of 6th of March 2004.
ECHO.ECHO updating XP Roll upECHO Please wait...start /wait %CDROM%\Install\hotfix\rupdate.exe /Q /O  /Z
ECHO.ECHO updating js56nenECHO Please wait...start /wait %CDROM%\Install\hotfix\js56nen.exe /Q:A /R:N
ECHO.ECHO updating Q322011ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q322011.exe /Q /O /Z
ECHO.ECHO updating Q814995ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q814995.exe /Q /O /Z
ECHO.ECHO updating Q820291ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q820291.exe /Q /O /Z
ECHO.ECHO updating Q821253ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q821253.exe /Q /O /Z
ECHO.ECHO updating Q826942ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q826942.exe /Q /O /Z
ECHO.ECHO updating Q823182ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q823182.exe /Q /O /Z
ECHO.ECHO updating Q824105ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q824105.exe /Q /O /Z
ECHO.ECHO updating Q824141ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q824141.exe /Q /O /Z
ECHO.ECHO updating Q825119ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q825119.exe /Q /O /Z
ECHO.ECHO updating Q826939ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q826939.exe /Q /O /Z
ECHO.ECHO updating Q828035ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q828035.exe /Q /O /Z
ECHO.ECHO updating Q828741ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q828741.exe /Q /O /Z
ECHO.ECHO updating Q833998ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q833998.exe /Q /O /Z
ECHO.ECHO updating Q835732ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q835732.exe /Q /O /Z
ECHO.ECHO updateing Q837001ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q837001.exe /Q /O /Z
ECHO.ECHO updating Q837009ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q837009.exe /Q:A /R:N
ECHO.ECHO updating Q831167ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q831167.exe /Q:A /R:N
ECHO.ECHO updating Q832894ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q832894.exe /Q:A /R:N
ECHO.ECHO updating Windows Media Player 9ECHO Please wait...start /wait %CDROM%\Install\hotfix\WMP9_MM2.exe /Q:A /R:N
ECHO.ECHO updating Q828026ECHO Please wait...start /wait %CDROM%\Install\hotfix\Q828026.exe /Q /O /Z
ECHO.ECHO updating qchainECHO Please wait...start /wait %CDROM%\Install\hotfix\qchain.exe 
ECHO.ECHO updating DirectX 9ECHO Please wait...start /wait %CDROM%\Install\hotfix\DX9NTopk.exe /Q:A /R:N
ECHO.ECHO Installing Winzip 9.0ECHO Please wait...IF EXIST=c:\progra~1\winzip GOTO TWOIF NOT EXIST=c:\progra~1\winzip GOTO ONE:ONEMKDIR c:\progra~1\winzip:TWOCOPY  %CDROM%\install\winzip\*.* c:\progra~1\winzip /yECHO.ECHO Installing WinZip 9.0ECHO Please wait...start /wait %systemdrive%\progra~1\winzip\winzip32.exe /noqp /autoinstall
ECHO.ECHO updating Registry tweaksECHO Please wait...start /wait REGEDIT /S %CDROM%\Install\Regtweak\RegTweak.reg
ECHO.ECHO updating Applications to be installed on rebootECHO Please wait...start /wait %CDROM%\RunOnce.cmd
ECHO.ECHO Restarting the PC in 60 seconds...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute. This will give enough time for the shortcuts to update and for the shell to fully load before its ready to restart!"
EXIT

runonce.cmd - does the RunOnceEx on first boot thing

@echo off
IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Installing Applications" /f
REG ADD %KEY%\002 /VE /D "Q817787" /fREG ADD %KEY%\002 /V 1 /D "%CDROM%\install\hotfixes\Q817787.EXE /Q:A /R:N" /f
REG ADD %KEY%\003 /VE /D "Q832483" /fREG ADD %KEY%\003 /V 1 /D "%CDROM%\install\hotfixes\Q832483.EXE /C:"dahotfix.exe /q /n" /f
REG ADD %KEY%\004 /VE  /D "Q817778" /fREG ADD %KEY%\004 /V 1 /D "%CDROM%\install\hotfixes\Q817778.exe /Q /O /N /Z" /f
REG ADD %KEY%\005 /VE /D "Adobe Reader 6" /fREG ADD %KEY%\005 /V 1 /D "%CDROM%\install\Applications\AdobeReader6\AR6.msi /qn" /f
REG ADD %KEY%\025 /VE /D "Lavasoft Ad-Aware 6 Build 181" /fREG ADD %KEY%\025 /V 1 /D "%CDROM%\install\Applications\AdAware\aaw6181.exe /s" /f
REG ADD %KEY%\035 /VE /D "Journal Viewer 1.5" /fREG ADD %KEY%\035 /V 1 /D "%CDROM%\install\Journal\jviewer.msi /QB" /f
REG ADD %KEY%\037 /VE /D "Microsoft JavaVM - Build 3810" /fREG ADD %KEY%\037 /V 1 /D "%CDROM%\install\JavaVM\MSjavx3810_full.exe /Q:A /R:N" /f
REG ADD %KEY%\042 /VE /D ".NET Framework v1.1" /fREG ADD %KEY%\042 /V 1 /D "%CDROM%\install\NetFramework\DOTNETFW.EXE /Q:A /R:N" /f
REG ADD %KEY%\047 /VE /D "Final Registry Tweaks" /fREG ADD %KEY%\047 /V 1 /D "REGEDIT /S %systemdrive%\install\RegTweak.reg" /f
EXIT

The virus removal batch is as follows:

@echo off
IF EXIST D:\CD.txt set CDROM=D:IF EXIST E:\CD.txt set CDROM=E:IF EXIST F:\CD.txt set CDROM=F:IF EXIST G:\CD.txt set CDROM=G:IF EXIST H:\CD.txt set CDROM=H:IF EXIST I:\CD.txt set CDROM=I:IF EXIST J:\CD.txt set CDROM=J:
ECHO.ECHO Turning off System RestoreECHO Please wait...start /wait REGEDIT /S %CDROM%\Install\Virus\sysrest.reg
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
REG ADD %KEY% /V TITLE /D "Running Sasser Removal Tool" /f
REG ADD %KEY%\001 /VE /D "Sasser Removal" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\Install\virus\FxSasser.exe /Start" /f
ECHO.ECHO Restarting the PC in 60 seconds...shutdown.exe -r -f -t 60 -c "Windows XP will now restart in 1 minute.Please hit F8 on reboot to get into Safe Mode!"
EXIT

You can arrange a directory structure on the CD so it's easily updatable when SP2 is released or to add the latest apps or virus removal tools. Good thing about Elihu's menu is you can keep adding menu buttons ad infinitum and a "next" button will appear to scroll through them, so you could fill up the CD with drivers or other useful software.

The guys at the repair shop are stoked with this as they can get on with other work while the auto stuff is happening and it's really handy if you have mates who want you to get virii off their computers - just give them the CD and tell 'em they can do it themselves and then update so it won't happen again - which means I've got more time to drink Guinness :)

Wish list:(stuff I haven't done yet)

Turn on Internet connection Firewall via reg tweak

Detect installed service packes and hotfixes ("IF Exist=yadyada GOTO" sort of routine) so you're not installing anything you don't have to.

Do more of the batch file stuff theough RunOnceEx

Drink more Guinness.

If anyone can find a way to streamline the coding that'd be great (as i said I'm not a programmer)

Hope it's useful.

Cheers

Reg (ofarimathea)

post-70-1083932260_thumb.jpg

post-70-1083932260_thumb.jpg

Link to comment
Share on other sites


kinda off topic, i hope you won't mind, i cant see any fitting thread to post this one to... here it goes...

can dotnet framework (dotnetfx.exe) be installed thru svcpack.inf? i tried doing it and running it with a parameter of /Q:A /R:N

[setupHotfixesToRun]JS56NEN.exe /Q:A /R:Ndotnetfx.exe /Q:A /R:N"Q832483.exe /C:""dahotfix.exe /q /n"" /q:a"KB823182.exe /Q /N /Z /O....qchain.exeDX9NTopk.exe

but during the t-13 part, it didn't go unattended. :rolleyes: all other files worked though.

thanks in advanced for your advise. :) more power.

Link to comment
Share on other sites

To easily expand the Libary use this code:

START

@ECHO OFF

md c:\updatelog

DIR /B %SYSTEMDRIVE%\install\hotfixes\win\1\>>%SYSTEMDRIVE%\install\hotfixes\win1.txt

DIR /B %SYSTEMDRIVE%\install\hotfixes\win\2\>>%SYSTEMDRIVE%\install\hotfixes\win2.txt

DIR /B %SYSTEMDRIVE%\install\hotfixes\win\3\>>%SYSTEMDRIVE%\install\hotfixes\win3.txt

DIR /B %SYSTEMDRIVE%\install\hotfixes\IE\>>%SYSTEMDRIVE%\install\hotfixes\ie.txt

FOR /f %%i IN (%SYSTEMDRIVE%\install\hotfixes\win1.txt) DO ECHO %SYSTEMDRIVE%\install\hotfixes\%%i -u -q -z>>%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

FOR /f %%i IN (%SYSTEMDRIVE%\install\hotfixes\win2.txt) DO ECHO %SYSTEMDRIVE%\install\hotfixes\%%i /q:a /r:n>>%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

FOR /f %%i IN (%SYSTEMDRIVE%\install\hotfixes\win3.txt) DO ECHO %SYSTEMDRIVE%\install\hotfixes\%%i /C:"dahotfix.exe /q /n" /q>>%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

FOR /f %%i IN (%SYSTEMDRIVE%\install\hotfixes\ie.txt) DO ECHO %SYSTEMDRIVE%\install\hotfixes\%%i /q:a /r:n>>%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

Move %SYSTEMDRIVE%\install\Hotfixes\win\1\*.* %SYSTEMDRIVE%\install\hotfixes

Move %SYSTEMDRIVE%\install\Hotfixes\win\2\*.* %SYSTEMDRIVE%\install\hotfixes

Move %SYSTEMDRIVE%\install\Hotfixes\win\3\*.* %SYSTEMDRIVE%\install\hotfixes

Move %SYSTEMDRIVE%\install\Hotfixes\ie\*.* %SYSTEMDRIVE%\install\hotfixes

Echo.

Echo Installiere Windows XP und Internet Explorer 6 SP1 Hotfixes

Echo Dieses kann bis zu einer Stunde dauern!

Echo bitte warten!

Echo.

ECHO qchain.exe>>%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

%SYSTEMDRIVE%\install\hotfixes\hotfixrun.bat

exit

Link to comment
Share on other sites

  • 3 years later...

hi, im trying to make an unattended win xp pro installation with hotfixes, drivers and program installations. But I get an error when installing because og the hotfixes. Im using Nlite.

I tried to make it manually, but same error.

Does anyone have the inf files i need to make the hotfixes work?

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.


×
×
  • Create New...