Jump to content

My experiences with multiInstaller XP Cd


Beagz

Recommended Posts

well, for some time i have been working with boot loaders and unattended cd installs (Thanks, Bashrat et.al.)!!!

I finally decided after learning how to create a cdshell based multiboot/multi diagnostic cd (2 versions of BartPE, memory testers, hard drive tester, other utilities.... some dos or command line some in PE) that I would attack making a multiple unattended Windows XP install cd (XP Pro [oem, retail, upgrade] and XP Home [oem, retail, upgrade) with all the driverpacks.

here is what I found to work easiest with multiple installers (yes I have 6 windows with driverpacks on 1 CD [not DVD])

first I got a copy of cdshell v.2106

then I got a copy of bcdw 2.0a1

I used the bcdw.csm module from bcdw-2.0a1\cdsh\modules and placed it in the \boot\modules folder for cdshell (it is 41kb)

Then I pieced together scripts from different authors so that I could have the machine pause 10sec wait for enter key or boot from hard drive. it also detects whether the machine can use graphics menus or text only. then loads the windows installer selection screen.

#
# Sample startup script demonstrating some basics.
# For CD Shell 2.0, Feb 2003
#

###############################################################################
# Paramétrage général
###############################################################################

set ConfirmerDemarrage = 1   # Specifie si on veut demander confirmation du boot sur le DVD
set ForceModeTxt = 0         # Forçage du mode texte au boot par la touche [T] à
                            # la place d'[Entrée]. C'est utile pour faire les tests
                            # mais le choix n'est pas affiché pour l'utilisateur
set BootToujours = 0         # Specifie de booter meme si le support ne semble pas bootable


###############################################################################
# Début du script
###############################################################################

START:
if $ConfirmerDemarrage == 0; then goto HOME

BOOT:
cls
SET TEXTCURSORX = 0; SET TEXTCURSORY = 22
print " Press [Enter] to boot from CD... (you have 10s)"
SET TEXTCURSORX = 0; SET TEXTCURSORY = 23
print " Press [T] for text menu instead of graphics"
getkey 10 goto BOOTC
if $lastKey == key[enter]; then cls; then goto HOME
if $lastKey == key[t]; then cls; then set ForceModeTxt = 1; then goto HOME
if $lastKey == key[T]; then cls; then set ForceModeTxt = 1; then goto HOME
goto BOOT


HOME:
if $vga; then if $vesa; then set ModeGraphique = 1; else set ModeGraphique = 0
if $ModeGraphique == 1 && $ForceModeTxt == 0; then goto GRPH; else goto TXT

GRPH:
# Set the name of the file we will attempt to start
set samplePath="scripts/doctorxp"
set sampleFile="example.cds"

# Check for the sample script.
if file[$samplePath/$sampleFile]; then cd $samplePath; then script $sampleFile

# Sample script not found.
print "Sample script not found!\n"
end

TXT:
# Set the name of the file we will attempt to start
set samplePath="scripts/doctorxp"
set sampleFile="examplt.cds"

# Check for the sample script.
if file[$samplePath/$sampleFile]; then cd $samplePath; then script $sampleFile

# Sample script not found.
print "Sample script not found!\n"
end

BOOTC:
cls
if bootCheck[0x80] == 3; then boot 0x80            # Boot HDD 0
if bootCheck[0x81] == 3; then boot 0x81            # Boot HDD 1
if $BootToujours == 1; then boot 0x80
print " This drive does not want to boot, try again (Y/N) ? \n\n"
getkey
if $lastKey == key[y]; then boot 0x80
if $lastKey == key[Y]; then boot 0x80
GOTO HOME

this then loads the cdshell scripts I have as noted used the example.cds for graphics and examplt.cds for text only. the only difference is as below...

the graphics one calls _menu.cds and the text one calls _menut.cds

## Please don't edit the below lines, except in the $Menu_Name, replace it with the name of the current script.
set Menu_Name="example.cds"
if !compare["$Reset_Menu" "OK"]; then set Reset_Menu="$Menu_Name"; then script _menu.cds; else set Reset_Menu=""

#####################
# Set Menu Text     #
#####################
Set Menu_Mode     = "Small"

Set Banner_Text   = "CD Shell - Sample script                   Written by Ahmad Hisham \\\"\\c7eDoctor xp\\c7f\\\""
Set TitleBar_Text = "       Please choose an option     [X]"

Set OptionText_1  = "        Windows XP Home OEM        "
Set OptionText_2  = "       Windows XP Home Retail      "
Set OptionText_3  = "      Windows XP Home  Upgrade     "
Set OptionText_4  = "    Windows XP Professional OEM    "
Set OptionText_5  = "  Windows XP Professional  Retail  "
Set OptionText_6  = "  Windows XP Professional Upgrade  "

#####################
# Set Menu Actions  #
#####################

Set ActionCmd1_1   = "bcdw boot /i388/setupldr.bin"
Set ActionCmd1_2   = "bcdw boot /i390/setupldr.bin"
Set ActionCmd1_3   = "bcdw boot /i386/setupldr.bin"
Set ActionCmd1_4   = "bcdw boot /i387/setupldr.bin"
Set ActionCmd1_5   = "bcdw boot /i391/setupldr.bin"
Set ActionCmd1_6   = "bcdw boot /i389/setupldr.bin"

## Please don't remove the below line
script _menu.cds
end

as far as the _menu.cds (graphics!!!) I just converted a bunch of .bmp files to .csi and numbered them 1-6 and placed them in the scripts folder and the file has this code to display them

StartMenuItem:
If $OptionDisabled_$MenuStep && $CurrentMenustep == ($MenuStep + 1)
 Then Set CurrentMenustep = $MenuStep
 Then Set MenuStep = $MenuStep - 1
 Then GoTo EndMenuItem
If $OptionDisabled_$MenuStep
 Then Set CurrentMenustep = $MenuStep
 Then Set MenuStep = $MenuStep + 1
 Then GoTo EndMenuItem
Set loop = $MenuStep_Min; Set loopEnd = $MenuStep_Max
loop0:
 Set textCursorX = $WindowMenu_XPos + 2
 Set textCursorY = $WindowMenu_YPos + ($loop * 2)
 If !$OptionDisabled_$loop; Then Print "$C_MO$OptionText_$loop"
Set loop = $loop + 1
If $loop > $loopEnd; Then GoTo endloop0
GoTo loop0
endloop0:
Set textCursorX = $WindowMenu_XPos + 2
Set textCursorY = $WindowMenu_YPos + ($MenuStep * 2)
Print "$C_MH$OptionText_$MenuStep"
NOTE--> show image $MenuStep

that is just the part for discussion (please no comments on the order of the actions I did not copy the cds to the hard drive in the order I wanted to use them.) :P

now I first copied the contents of my windows cd to a hard drive folder %drive%\XP and integrated the driverpacks for each version.

then I copied the i386 (or renamed) folder and the oem and $oem$ folders to the %drive%\install folder it looks like this

root\
    -$oem$ (with subdirs)
    -boot (the cdshell contents)
    -i386(removed the win9xup et.al. folders)
           -asms
           -compdata
           -drw
           -lang
           -system32
    -i387
    -i388
    -oem (driverpacks)
    -win51 (cd file for xp)
    -win51IC (ibid) [for home]
    -win51IC.sp2 (ibid) [for home]
    -win51IP (ibid) [for pro]
    -win51IP.sp2 (ibid) [for pro]

that's it no other dirs needed

now the tricky part each i3xx folder has setupldr.bin these needed to be opened with a hexeditor and references to i386 were changed in 4 places to correspond to thier home directory so if it is in the i387 folder all cases of i386 were changed to i387 and so on.

then I had to open the txtsetup.sif files and replace all cases of i386 with the corresponding folder (thankfully notepad does this well and replace all works great)

once I had all this setup CDIMAGE to the rescue!!!! using the following

cdimage -l"Installer" -m -h -j1 -oci -bd:\loader.bin d:\XP d:\installer.iso

I just made that a batch file 'installer.cmd'

hope this helps someone :) have fun

thanks again Bashrat and all those who make these great utilities!!!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...