millenod Posted March 24, 2011 Posted March 24, 2011 (edited) Hi,I'm actually working on a custom XP SP3 installation, based on a msdn version.My goal is to write scripts to remove unwanted components, then to create a new master of the XP SP3 cdI can't use nlite, and I can use only batch scripts.here is a sample of a script I wrote to remove games components :@echo offREM Configuration file :REM - games.infREMREM External files :REM - layout.infREM - txtsetupREM - dosnet.infREM - sysoc.inf (games.inf)REM - hivesft.infREM - hiveusd.infREMREM Modules :REM - FreecellREM - HeartsREM - MinesweeperREM - SolitaireREM - Spiderset backupDir="..\Backup ISO files"set componentDir="Games"set i386Dir="..\..\cd\i386"set hiveUSDRef="Games.hiveusd"set hiveSFTRef="Games.hivesft"if not exist %backupDir% mkdir %backupDir%if not exist %backupDir%\%componentDir% mkdir %backupDir%\%componentDir%echo * Backup files :move %i386Dir%\games.in_ %backupDir%\%componentDir%echo - Freecellmove %i386Dir%\freecell.ex_ %backupDir%\%componentDir%move %i386Dir%\freecell.ch_ %backupDir%\%componentDir%move %i386Dir%\freecell.hl_ %backupDir%\%componentDir%move %i386Dir%\freecell.cn_ %backupDir%\%componentDir%echo - Heartsmove %i386Dir%\mshearts.ex_ %backupDir%\%componentDir%move %i386Dir%\mshearts.ch_ %backupDir%\%componentDir%move %i386Dir%\mshearts.cn_ %backupDir%\%componentDir%move %i386Dir%\mshearts.hl_ %backupDir%\%componentDir%echo - Minesweepermove %i386Dir%\winmine.ex_ %backupDir%\%componentDir%move %i386Dir%\winmine.ch_ %backupDir%\%componentDir%move %i386Dir%\winmine.hl_ %backupDir%\%componentDir%move %i386Dir%\winmine.cn_ %backupDir%\%componentDir%echo - Solitairemove %i386Dir%\sol.ex_ %backupDir%\%componentDir%move %i386Dir%\sol.ch_ %backupDir%\%componentDir%move %i386Dir%\sol.hl_ %backupDir%\%componentDir%echo - Spidermove %i386Dir%\spider.ex_ %backupDir%\%componentDir%move %i386Dir%\spider.ch_ %backupDir%\%componentDir%move %i386Dir%\spider.hl_ %backupDir%\%componentDir%echo * Generating Scriptsecho games.inf>> txtsetup.logREM Freecellecho freecell.exe>> txtsetup.logecho freecell.chm>> txtsetup.logecho freecell.hlp>> txtsetup.logecho freecell.cnt>> txtsetup.logREM Heartsecho mshearts.exe>> txtsetup.logecho mshearts.chm>> txtsetup.logecho mshearts.cnt>> txtsetup.logecho mshearts.hlp>> txtsetup.logREM Minesweeperecho winmine.exe>> txtsetup.logecho winmine.chm>> txtsetup.logecho winmine.hlp>> txtsetup.logecho winmine.cnt>> txtsetup.logREM Spiderecho sol.exe>> txtsetup.logecho sol.chm>> txtsetup.logecho sol.hlp>> txtsetup.logecho spider.exe>> txtsetup.logecho spider.chm>> txtsetup.logecho spider.hlp>> txtsetup.logecho * Updating configuration files :echo - txtsetup.siffindstr /v /b /i /g:txtsetup.log %i386Dir%\TXTSETUP.SIF > TXTSETUP.SIFmove TXTSETUP.SIF %i386Dir%\TXTSETUP.SIFecho - dosnet.infFOR /F %%G IN (txtsetup.log) DO @echo d1,%%G>> dosnet.logfindstr /v /b /i /g:dosnet.log %i386Dir%\dosnet.inf > dosnet.infmove dosnet.inf %i386Dir%\dosnet.infdel dosnet.logecho - layout.inffindstr /v /b /i /g:txtsetup.log %i386Dir%\layout.inf > layout.infmove layout.inf %i386Dir%\layout.infdel txtsetup.logecho - sysoc.inf@expand -r %i386Dir%\sysoc.in_type %i386Dir%\sysoc.inf > %i386Dir%\sysoc.inf.ansifindstr /v /i /c:",games.inf," %i386Dir%\sysoc.inf.ansi > sysoc.infmove sysoc.inf %i386Dir%\sysoc.inf@makecab %i386Dir%\sysoc.inf %i386Dir%\sysoc.in_del %i386Dir%\sysoc.inf.ansidel %i386Dir%\sysoc.infecho - hivesft.inftype %i386Dir%\HIVESFT.INF > HIVESFT.INF.ansifindstr /v /i /L /g:%hiveSFTRef% HIVESFT.INF.ansi > HIVESFT.INF.ansi.tmpcmd /u /c type HIVESFT.INF.ansi.tmp > %i386Dir%\HIVESFT.INFdel HIVESFT.INF.ansidel HIVESFT.INF.ansi.tmpecho - hiveusd.inftype %i386Dir%\HIVEUSD.INF > HIVEUSD.INF.ansifindstr /v /i /L /g:%hiveUSDRef% HIVEUSD.INF.ansi > HIVEUSD.INF.ansi.tmpcmd /u /c type HIVEUSD.INF.ansi.tmp > %i386Dir%\HIVEUSD.INFdel HIVEUSD.INF.ansidel HIVEUSD.INF.ansi.tmpAfter removing these files, I edit the following files, to remove the '_x' parameter on the layout.inf line :- TXTSETUP.SIF- LAYOUT.INFThen I replace setupapi.dl_ with a patched version, using this tuto : http://www.vorck.com/windows/edit-setupapi.htmlI burn the image, but the installation process isn't the same.On my custom install, I install my specific drivers, then I tell the system to don't install non signed drivers.With the modification I made, the system can't install audio/videos codecs, video drivers, ...If someone has an idea.Thanks in advance Edited March 24, 2011 by millenod
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now