Andreas T Posted September 28, 2008 Share Posted September 28, 2008 (edited) I just thought it might be a good idea to share my build script, centered around a slightly modified HFSLIP version 1.7.8 script, that I use to generate my ISO image for Windows XP Professional 32-bit up-to-date as of 2008-09-27 (excludes Windows Search 4.0 (what were they (Microsoft) thinking?) and Microsoft Silverlight 1.0 plus KB938127 which was slipstreamed but did not stick) with DriverPacks 8.05 and many common run-times and components.The aim of the generated ISO is for it to be a universal Windows XP Professional DVD (sorry it's too big for a CD) that installs to the destination drive and never needs to refer back to the source disc once it has been installed. (Optical media is just too slow and fiddly for my liking.)The ISO builds unattended but Windows itself does not install unattended (but there's no reason why it could not be customized so that it does).NOTE: Initial login will be slow and may appear to have hung as some run-times and components are being silently installed. Once logged in, reboot to finalize installation.All files unless otherwise specified live in the HFSLIP folder and have been built and tested under Windows XP Professional using Microsoft Virtual PC 2007 (in fact, the generated ISO has built-in support for this virtual machine by installing its Virtual Machine Additions if it is installed under VPC 2007). It has also been tested on one of my physical machines.Enough of the introduction. I'll let the code do the talking instead...OK, not code as such, but here's the first file "___README___.txt"...Please note that "DriverPacks", as used by the unattended scripts (and consequently the build scripts), uses a fixed path to HFSLIP's SOURCESS folder. This path is defined by the "location" variable in DriverPacks' ini-file. This path must be correct before running any of the scripts.Please also note that the HFSLIP folder-path should not contain spaces or any exotic characters.There are two ways to build, both which are completely unattended. The first is by using "__BUILD.cmd"...call HFSLIP_Unattended.cmdThe second way to build is by using "__BUILD_AND_NOTIFY.cmd"...call HFSLIP_Unattended.cmd:loopcall Beep.cmdgoto :loopPlease note that "__BUILD_AND_NOTIFY.cmd" must be terminated manually or you'll go bananas listening to the beep, which, by the way, is generated by "Beep.cmd"...@echo offmplay32.exe /play /close C:\Windows\Media\ringin.wavHere's the file common to both build scripts, i.e., "HFSLIP_Unattended.cmd"...rem @echo offset HFSLIP_UnattendedLog=HFSLIP_Unattended.logdel /f %HFSLIP_UnattendedLog% > nul 2>&1echo HFSLIP_Unattended_Before.cmd started at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1call HFSLIP_Unattended_Before.cmd >> %HFSLIP_UnattendedLog% 2>&1echo HFSLIP_Unattended_Before.cmd completed at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1set NOPAUSE=1set MAKENOISO=1set AHTEST=I HAVE READ THE INSTRUCTIONSecho HFSLIP.cmd started at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1cmd /c HFSLIP.cmd 1 >> %HFSLIP_UnattendedLog% 2>&1echo HFSLIP.cmd completed at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1echo HFSLIP_Unattended_After.cmd started at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1call HFSLIP_Unattended_After.cmd >> %HFSLIP_UnattendedLog% 2>&1echo HFSLIP_Unattended_After.cmd completed at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1set MAKENOISO=set AHTEST=MAKEISOecho HFSLIP.cmd started at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1cmd /c HFSLIP.cmd 1 >> %HFSLIP_UnattendedLog% 2>&1echo HFSLIP.cmd completed at %date% %time% >> %HFSLIP_UnattendedLog% 2>&1set AHTEST=set MAKENOISO=set NOPAUSE=This executes "HFSLIP_Unattended_Before.cmd"...rem @echo offrmdir /s /q SOURCEmkdir SOURCExcopy /e /v /q /h /k "SOURCE.base" SOURCEFollowed by "HFSLIP.cmd"...@echo offcall hfslip-1.7.8.cmdAnd finally "HFSLIP_Unattended_After.cmd"...rem @echo offcall DriverPacks_Unattended.cmdmkdir $OEM$mkdir $OEM$\$$mkdir $OEM$\$$\Sourcexcopy /e /v /q /h /k SOURCESS $OEM$\$$\Sourcemove $OEM$ SOURCESSThe main guts of it all takes place in the all famous "hfslip-1.7.8.cmd", except that mine is slightly modified to handle my unattended requirements (please let me know if there's a better way). Don’t worry, I'm not going to post the whole code here, just the differences (using the standard diff format) between the original and mine (please note that the first difference is minor and optional, but I think it to be useful for debugging)...Left file: hfslip-1.7.8.orig.cmd Right file: hfslip-1.7.8.cmd1c1< @ECHO OFF---> rem @ECHO OFF42c42< PAUSE---> CALL :PAUSE71c71< PAUSE---> CALL :PAUSE97c97< PAUSE---> CALL :PAUSE123c123< PAUSE---> CALL :PAUSE178a179> IF /I "%NOPAUSE%"=="1" GOTO :BINCOMPSLICE214a216> IF /I "%NOPAUSE%"=="1" GOTO :DELCATS550c552< CALL :TIMECALC&PAUSE&EXIT---> CALL :TIMECALC&CALL :PAUSE&EXIT2927c2929< ECHO you use one that hasn't been patched before.&ECHO.&PAUSE---> ECHO you use one that hasn't been patched before.&ECHO.&CALL :PAUSE3203c3205< IF /I "%AHTEST%"=="MAKEISO" IF EXIST SOURCESS CALL :MAKEISO&PAUSE&EXIT---> IF /I "%AHTEST%"=="MAKEISO" IF EXIST SOURCESS CALL :MAKEISO&CALL :PAUSE&EXIT4268a4271,4275> :PAUSE> IF /I "%NOPAUSE%"=="1" GOTO :EOF> PAUSE> GOTO :EOFThe same as above but expressed in Beyond Compare 2 XML format (because, XML is, apparently, more "readable")...<bcreport created="28/09/2008 12:57:25 p.m."> <ltpath></ltpath> <rtpath></rtpath> <filecomparison created="28/09/2008 12:57:25 p.m."> <filename1>hfslip-1.7.8.orig.cmd</filename1> <filename2>hfslip-1.7.8.cmd</filename2> <linecomp status="different"> <text ltid="1">@ECHO OFF</text> <text rtid="1">rem @ECHO OFF</text> </linecomp> <linecomp status="different"> <text ltid="42">PAUSE</text> <text rtid="42">CALL :PAUSE</text> </linecomp> <linecomp status="different"> <text ltid="71">PAUSE</text> <text rtid="71">CALL :PAUSE</text> </linecomp> <linecomp status="different"> <text ltid="97">PAUSE</text> <text rtid="97">CALL :PAUSE</text> </linecomp> <linecomp status="different"> <text ltid="123">PAUSE</text> <text rtid="123">CALL :PAUSE</text> </linecomp> <linecomp status="rtonly"> <text rtid="179">IF /I "%NOPAUSE%"=="1" GOTO :BINCOMPSLICE</text> </linecomp> <linecomp status="rtonly"> <text rtid="216">IF /I "%NOPAUSE%"=="1" GOTO :DELCATS</text> </linecomp> <linecomp status="different"> <text ltid="550">CALL :TIMECALC&PAUSE&EXIT</text> <text rtid="552">CALL :TIMECALC&CALL :PAUSE&EXIT</text> </linecomp> <linecomp status="different"> <text ltid="2927"> ECHO you use one that hasn't been patched before.&ECHO.&PAUSE</text> <text rtid="2929"> ECHO you use one that hasn't been patched before.&ECHO.&CALL :PAUSE</text> </linecomp> <linecomp status="different"> <text ltid="3203">IF /I "%AHTEST%"=="MAKEISO" IF EXIST SOURCESS CALL :MAKEISO&PAUSE&EXIT</text> <text rtid="3205">IF /I "%AHTEST%"=="MAKEISO" IF EXIST SOURCESS CALL :MAKEISO&CALL :PAUSE&EXIT</text> </linecomp> <linecomp status="rtonly"> <text rtid="4271">:PAUSE</text> </linecomp> <linecomp status="rtonly"> <text rtid="4272">IF /I "%NOPAUSE%"=="1" GOTO :EOF</text> </linecomp> <linecomp status="rtonly"> <text rtid="4273">PAUSE</text> </linecomp> <linecomp status="rtonly"> <text rtid="4274">GOTO :EOF</text> </linecomp> </filecomparison></bcreport>That leaves us with one file left, i.e., "DriverPacks_Unattended.cmd"...rem @echo offset DriverPacks_Dir=DriverPacks\DPs_BASE_805set DriverPacks_INI=DPs_BASE.iniset DriverPacks_UnattendedINI=DPs_BASE_NOGUI.inidel /f %DriverPacks_Dir%\%DriverPacks_UnattendedINI% > nul 2>&1call :CreateUnattendedINI%DriverPacks_Dir%\DPs_BASE.exe /settings:%DriverPacks_UnattendedINI%del /f %DriverPacks_Dir%\%DriverPacks_UnattendedINI% > nul 2>&1set DriverPacks_Dir=set DriverPacks_INI=set DriverPacks_UnattendedINI=goto :end:CreateUnattendedINIfor /f "delims=" %%a in (%DriverPacks_Dir%\%DriverPacks_INI%) do (call :ProcessLine "%%a")goto :eof:ProcessLineset LINE=%~1if /i "%LINE%"=="GUI = "yes"" set LINE=GUI = "no"echo %LINE%>>%DriverPacks_Dir%\%DriverPacks_UnattendedINI%goto :eof:endOf course, it goes without saying that the "DriverPacks"\DPs_BASE_805" folder contains the files installed by "DPs_BASE_805.exe" plus **all** official DriverPacks.Then there is the all-important "HFANSWER.INI" (which resides under "HFTOOLS")...DRIVERCOMP=SBOOTPATH=MBOOTPATH=DELCATS=BACKUPSOURCE=NOLOGCOPY=ISONAME=ISOTITLE=HFSLIPFORCECDIMAGE=1;CDIMGSW=-h -j1 -mCDIMGSW=-h -j1 -x -ocis -w3 -mMKISSW=-relaxed-filenames -d -D -N -J -no-emul-boot -no-iso-translate -boot-load-size 4 -duplicates-once;MAKENOISO=OVERWRITEISO=IE7BACKUP=IE7GUILOGON=IE7SVCPACK=INCWMPCSKIN=INCALLSKINS=XPIZESW=FORCEXPIZESLIP=INSTALLRC=1And we can't forget about "DPs_BASE.ini" (which resides under "DriverPacks\DPs_BASE_805")...[General]; preferred languageprefLang = "English"; yes/no, enable or disable the wizard-style buttons, if not specified: yeswizardButtons = "yes"; yes/no, enable or disable the GUI, if not specified: yesGUI = "yes"[Settings]; disc/bartpe/multibootDiscinstPlatform = "disc"; trailing backslash is allowed, but not necessarylocation = "E:\HFSLIP\SOURCESS"; none/all/select, if select, specify them below, if not specified: allDriverPacks = "select"; 1/2, method to install the DriverPacks, if not specified: 2DPsMethod = "2"; GUIRunOnce/RunOnceEx/custom, if not specified: GUIRunOncefinisherMethod = "GUIRunOnce"; this section is optional![OptionalSettings]; none/all/select/paths/patterns, enable or disable Keep The Drivers (KTD) , if not specified: noneKTD = "all"; <path>, to specify a custom KTD cache location, if not specified: default (%SystemRoot%\DriverPacks)KTDlocation = "%SystemRoot%\DriverPacks"; yes/no, enable or disable QuickStream Cache (QSC), if not specified: yesQSC = "yes"; you should only add this section if you've set [Settings]\DriverPacks to "select"[SelectDriverPacks]DP_Chipset = "yes"DP_CPU = "yes"DP_Graphics_A = "yes"DP_Graphics_B = "yes"DP_Graphics_C = "yes"DP_LAN = "yes"DP_MassStorage = "yes"DP_Sound_A = "yes"DP_Sound_B = "yes"DP_WLAN = "yes"DP_MassStorage_textmode = "yes"; this section is optional![OptionalSettingsOther]; CCC/CCP, use ATI Catalyst Control Center or ATI Catalyst Control Panel (only relevant when slipstreaming DriverPack Graphics A)ATI_cpl = "CCC"There's also a very important, but simple script called "SetupEx.cmd" which sits under "HFSVCPACK"...@echo offSET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersionrem Set installation source pathREG ADD "%KEY%\Setup" /F /T REG_SZ /V SourcePath /D "%WINDIR%\Source"Of course, there's more to it than these scripts. For starters, the "SOURCE.base" folder contains a dump of all the files from the original Windows XP Professional SP2 CD. This is done because HFSLIP appears to apply SP3 to "SOURCE" instead of leaving it untouched (but I could be wrong).This is the log generated by HFLSIP which lists all the remaining files and their locations... This file is automatically generated by HFSLIP HFSLIP is for personal use only Copyright© TommyP 2005-2008============================HOW TO REPORT A PROBLEM============================ If running into problems, refer to [url="http://hfslip.org/support.html"]http://hfslip.org/support.html[/url] HFSLIP support forum: [url="http://msfn.org/board/index.php?showforum=129"]http://msfn.org/board/index.php?showforum=129[/url]===============================================================================Host OS - Windows XPHFSLIP Version - 1.7.8, build 80614HFSLIP Path - E:\HFSLIP\OS in SOURCESS - Windows XP Professional SP3 English [Service Pack Slipstreamed By HFSLIP]MSIE Version - MSIE7Drivers - DRIVER.CAB UpdatedCD Install Path - DefaultCDTAG - WIN51===============================================================================Files in your HF folder:directx_jun2008_redist.exeIE7-WindowsXP-KB953838-x86-ENU.exeIE7-WindowsXP-x86-ENU.exeWindowsMedia11-KB929399-v2-x86-ENU.exeWindowsMedia11-KB936782-x86-ENU.exeWindowsMedia11-KB939683-x86-ENU.exeWindowsMedia11-KB954154-x86-ENU.exeWindowsUpdateAgent30-x86.exeWindowsXP-KB898461-x86-ENU.exeWindowsXP-KB905474-ENU-x86-Standalone.exeWindowsXP-KB923789-x86-ENU.exeWindowsXP-KB936929-SP3-x86-ENU.exeWindowsXP-KB938127-v2-x86-ENU.exeWindowsXP-KB938464-x86-ENU.exeWindowsXP-KB941569-x86-ENU.exeWindowsXP-KB942288-v3-x86.exeWindowsXP-KB946648-x86-ENU.exeWindowsXP-KB950762-x86-ENU.exeWindowsXP-KB950974-x86-ENU.exeWindowsXP-KB951066-x86-ENU.exeWindowsXP-KB951072-v2-x86-ENU.exeWindowsXP-KB951376-v2-x86-ENU.exeWindowsXP-KB951698-x86-ENU.exeWindowsXP-KB951748-x86-ENU.exeWindowsXP-KB951978-x86-ENU.exeWindowsXP-KB952287-x86-ENU.exeWindowsXP-KB952954-x86-ENU.exeWindowsXP-KB953839-x86-ENU.exeWMP11-WindowsXP-x86-ENU.exeX86-all-rootsupd.exeFiles in your HFCABS folder:ieawsdc.cabMUAuth.cabMuCatalogWebControl.cabmuweb_site.cabOGAControl.cabopuc4.cabwbemoc.cabFiles in your HFGUIRUNONCE folder:010_RogueSpearsRuntimesPart2_1_5_0.exeFiles in your HFSVCPACK folder:0_RogueSpearsRuntimes_2_8_8.exe5_RogueSpears_OtherRuntimes_2_5_0.exeSetupEx.cmdVirtualMachineAdditions_13_820_silent.exeFiles in your HFSVCPACK_SW1 folder:WindowsXP-KB951618-v2-x86-ENU.exeFiles in your HFSVCPACK_SW2 folder:Files in your HFTOOLS folder:bbie.exeBOOT.BINCDIMAGE.EXECDIMAGE.txtcmdow.exeCreateurSFX.exeEXTRACT.EXEHFANSWER.INIHFSLIP_POST_getnewfiles_v3.cmdmkisofs.exemkisofs.txtmodifyPE.exeFiles in your REPLACE folder:===============================================================================HFSLIP run time: 11m01sPlease note that I used "CreateurSFX.exe" (the "other one" would simply not work) to build "VirtualMachineAdditions_13_820_silent.exe" using the switches "/qn /norestart". I have also renamed Rogue Spear's executables by replacing all in-name dots (".") with underscores ("_") as it makes them more ISO-compliant.Please also note that I do not include "LegitCheckControl.cab" under "HFCABS" because the latest version of "KB905474" is a replacement for this (and is always up-to-date).Enjoy,-Andreas Edited September 28, 2008 by Andreas T Link to comment Share on other sites More sharing options...
Noise Posted September 28, 2008 Share Posted September 28, 2008 You should use robocopy instead of xcopy.Your scripts are simple, which is good - but inefficient. You use rmdir instead of rd - but it's OK, you're young.But, you have the fatal mistake of assuming that people have the same binaries in their path as you do (mplay32.exe). My advice, go out and get laid. Link to comment Share on other sites More sharing options...
Andreas T Posted September 28, 2008 Author Share Posted September 28, 2008 (edited) You should use robocopy instead of xcopy.Your scripts are simple, which is good - but inefficient. You use rmdir instead of rd - but it's OK, you're young.But, you have the fatal mistake of assuming that people have the same binaries in their path as you do (mplay32.exe). My advice, go out and get laid.First of all, does any of your feedback address the "but inefficient" comment? Either way, efficiency is not an issue as I tend to start a build and "go out and get laid." About your comments regarding robocopy and mplay32.exe. My aim was to use as little extra tools as possible. That automatically rules out robocopy which is non-standard under Windows XP. However, mplay32.exe on the other hand, is standard. (Yes, I know, I have a few non-standard tools under HFTOOLS, but I've tried to keep them to a minimum.)Additionally, using rd or rmdir makes no difference, they are in fact identical. (Just run "rd /?" and "rmdir /?" to see that they both mention "each other" in the usage.) In fact, good coding practices state that functions etc., should be descriptive which makes rmdir a better alternative over rd. Edited September 29, 2008 by Andreas T Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now