I make unattended cd\'s that auto install windows xp and a bunch of software and fixes. One problem is that the cd\'s i give people don\'t make a local source. So if a friend of mine uses one of my cd\'s to install windows for a friend, if that friend needs the installation files for any reason they\'ll need the cd. Many OEM\'s put the installation files on drive C, and i was exploring ways to do this.
One method i found was sysprep.ini has a switch called MakeLocalSource or something, but that setting doesn\'t work in an unattend file. One promising lead was bink made a tool called getcd or something that got the cdrom drive letter. However it appears to be a dos app, and i couldn\'t get it to work in testing.
After searching newsgroups i find this idea -
Below is a batch file that will look for a file on each drive letter, once it\'s found it sets that drive letter as a cdrom. It will also install recovery console locally! So when you install windows xp for a friend, not only will he have the source files locally (so he wont need the cd), but he\'ll also have recovery console installed.
A couple of things are assumed in the following batch file:
-you are installing from a xp sp1 slipstreamed cd
-you want to copy the xp install files to %windir%Source
-you want to install recovery console silently
----- below is source.bat for a sp1 cd------------
@ECHO OFF
IF EXIST C:WIN51IP.SP1 set CDROM=C:
IF EXIST D:WIN51IP.SP1 set CDROM=D:
IF EXIST E:WIN51IP.SP1 set CDROM=E:
IF EXIST F:WIN51IP.SP1 set CDROM=F:
IF EXIST G:WIN51IP.SP1 set CDROM=G:
IF EXIST H:WIN51IP.SP1 set CDROM=H:
IF EXIST I:WIN51IP.SP1 set CDROM=I:
IF EXIST J:WIN51IP.SP1 set CDROM=J:
IF EXIST K:WIN51IP.SP1 set CDROM=K:
IF EXIST L:WIN51IP.SP1 set CDROM=L:
IF EXIST M:WIN51IP.SP1 set CDROM=M:
IF EXIST N:WIN51IP.SP1 set CDROM=N:
IF EXIST O:WIN51IP.SP1 set CDROM=O:
IF EXIST P:WIN51IP.SP1 set CDROM=P:
IF EXIST Q:WIN51IP.SP1 set CDROM=Q:
IF EXIST R:WIN51IP.SP1 set CDROM=R:
IF EXIST S:WIN51IP.SP1 set CDROM=S:
IF EXIST T:WIN51IP.SP1 set CDROM=T:
IF EXIST U:WIN51IP.SP1 set CDROM=U:
IF EXIST V:WIN51IP.SP1 set CDROM=V:
IF EXIST W:WIN51IP.SP1 set CDROM=W:
IF EXIST X:WIN51IP.SP1 set CDROM=X:
IF EXIST Y:WIN51IP.SP1 set CDROM=Y:
IF EXIST Z:WIN51IP.SP1 set CDROM=Z:
ECHO Please wait, Recovery Console is being installed locally.
%CDROM%i386winnt32.exe /dudisable /cmdcons /unattend
md %systemroot%Sourcei386
ECHO Please wait, source files are being copied. This may take several minutes.
xcopy /Y /e %CDROM%i386*.* %systemroot%Sourcei386
ECHO Adding registry entries.
regedit.exe /s Shared.reg
ECHO Done.
exit
---------end of source.bat ------------------
You can use a reg file to change the sourcepath, so xp will know where to look for the source files.
--------- below is source.reg ------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionSetup]
\"SourcePath\"=\"%systemroot%Source\"
\"ServicePackSourcePath\"=\"%systemroot%Source\"
------ end of source.reg --------------------
So this can be very useful! You\'ll need to do an oempreinstall to use source.bat and source.reg.
I\'ll try to attach source.bat
-gosh