Jump to content

Beagz

Member
  • Posts

    18
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Posts posted by Beagz

  1. here is a sample

    cdimage -l"%date%" -h -j1 -oci -m -be:\loader.bin Drive:\Path Drive:\image.iso

    -l you have already figured out as the label for the cd

    -h -j1 -oci -m are parameters for the image type

    -b is the name and location of the bootable cd file (e: is my hard drive)

    Drive:\Path is the drive and path of the folder containing the files you want on your cd.

    Drive:\image.iso is the filename of your ready to burn iso image

    hope this helps.

    btw -m is so that if you want to make an image larger than a cd (i.e. a dvd) then it will still create the iso and not quit and delete the file.

  2. this is the same type of problem I was having and the reason for my post. It seemed I could never get windows to install properly unless the i3xx directory was in the root of the CD. There is no need for any other folder from WindowsXP to reside in the root and since you already have the cd files there (win51ip etc.) it will just share those. if you have more than one windows install all you have to do is hexedit the setupldr.bin (which stays in i3xx) and replace the 4 occurences of i3xx to correspond to the folder. then instead of changing the setupsourcepath (in txtsetup.sif, which also stays in i3xx) you just replace all instances of i386 to match as well. I know that means you will also add 'programs' and 'etc' to your root but at least it will work correctly.

  3. 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!!!

  4. Thanks, Beagz :)

    And I must say: clever idea :) Once thought of it myself, but it was far far away (:P) in the misty and forgetting world that's called my brains :P

    P.S.: Did you use THIS method or Schalti's method (SetupCopyOEMInf.exe)?

    I tried both and some other methods. Just doing the Method 1 preparation and then copying all the driver folders (C, G, M, L, S, W) to cd works best. Using the SetupCopyOEMInf.exe did not yield any better result in my case.

    I prefer just having a CD that I can use on any computer even with windows already installed and not have to go hunting the drivers down.

    Thanks again!

  5. I think the best solution (at least for me) was to just unpack the drivers with method 1. then burn the drivers folders onto a cd-rom. Now whenever I need to load new drivers I just pop in the cd and windows is automatically set to browse all cd directories and this works!

    Thanks Bashrat for all your hard work!!!

    MUCH APPRECIATED.

  6. hmmm, well I tried this and it certainly seems to work but there seems to be a problem when using multiple files with the same name. It runs through the setup and then just locks up when loading windows the first time and I cannot get it to load windows anytime after.

    I wonder if this only works with a cab file that has only different filenames. Or maybe I am just doing something wrong. can you post a link to a step-by-step guide?

  7. ok, I got it setup so that I have a cab file on the install cd. with appropriate lines in the corresponding setup files. I made an inffiles.7z (subdirs included) so that I could extract it during setup. then the setupcopyoeminf.exe can add all those infs to windows. the cab is in the right place but it just seems that even with the inf files incorporated into windows it does not search the cab file for them.

    what did I leave out?

    from what I understand the txtsetup.sif file works this way

    [sourcedisksfiles.x86]

    ati2dvag.sys = 100,,,,,,,,3,3

    100=sp2.cab

    if it was 1 it would be the driver.cab

    is it related to the line "100 = %spcdname%,%spcdtagfilei%,,\i386,1" found under [sourcedisksnames.x86] ?

    can that be changed to reflect the new mydrivers.cab file for installation?

    also the 3,3 seems to refer to the windows\system32 directory for placement.

  8. @ Nazgul

    I don't know why but when I run your script I get result.txt files in nearly every directory. also I believe line 12 which is

    if not exist "%output%" echo %%I>"%output%"

    should be

    if not exist "%output%" echo>"%output%"

    meanwhile I did get this to work. and it also gives me a list of .inf files so that it can be used.

    @echo off
    dir /s /a:d /b >dirs.txt

    set files=%cd%\files.txt
    set infs=%cd%\inffiles.txt
    set stage2=%cd%\driverlist.txt
    set final=%cd%\drivers.txt

    if exist "%infs%" del /q "%infs%"
    if exist "%files%" del /q "%files%"
    if exist "%final%" del /q "%final%"

    for /f %%a in (dirs.txt) do (
    dir %%a\*.inf /b >>"%infs%"
    )


    for /f %%b in (dirs.txt) do (
    dir /a:-d /b >> "%files%" %%b
    findstr /L /I /E /V .inf "%files%">"%stage2%"
    )

    for /f %%c in (%stage2%) do (
    if not exist "%final%" echo >"%final%"
     findstr /L /I /B "%%c" "%final%" > NUL
    if errorlevel 1 echo %%c>>"%final%"

    )

    I borrowed a lot from you so I do not take much credit for this. thanks!

    @erik

    so is this useful or is the other method working now?

  9. ok here's what I got.

    first do a listing of all directories of DP and save to dirs.txt

    dir /s /a:d /b >dirs.txt

    next parse the dirs.txt file and list all files in each dir

    for /f %a in (dirs.txt) do dir /a:-d /b >test.txt %a

    what I don't know how to do is to append the test.txt instead of rewriting it.

  10. I am asking anyone who reads this...

    If you can make a program to scan a directory, and list all the file names it finds in a .TXT file. That way we can then copy and paste out of it and into our DRVINDEX.INF it will make maintaining the CAB a very simple matter.  :thumbup

    dir /b > filename.txt

    simple enough if this is what you are talking about

    don't know if this helps but

    dir /s /b > filename.txt

    will not only list files in primary but also all subdirs into a txt file.

×
×
  • Create New...