Topic: How to modify batches to work from different folders?

Hi. I'm building a CD that contains CD\WXPP (normal XP), CD\WXPN (nLited XP) and CD\WXPS (nLited XP + DriverPack Mass Storage 11.11). For that to work I copied the I386 folder from each CD folder to the root, renamed each one to the same names above (WXPP, WXPN, WXPS), patched SETUPLDR.BIN, TXTSETUP.SIF and boot file accordingly and used cdshell as boot loader.

They all install fine in Virtual PC except for WXPS because the drivers/files/folders are not where the batches expect them to be. If I make an ISO of the WXPS folder (all files/folders in root as expected) it installs fine, because I can see the progress bar at the beginning of the GUI mode and at first boot.

I already know that CD\WXPS\I386\presetup.cmd and CD\WXPS\OEM\DP_Install_Tool.cmd must be edited, but I don't know if there is any other file I should edit. So far I made the following changes to the 2 batches, but with no success (no progress bars during installation).

CD\WXPS\I386\presetup.cmd and WXPS\presetup.cmd, added 1 line after the SET command:

SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:\CD\WXPS\OEM SET CDDRIVE=%%i:\CD\WXPS & GOTO DPsFound
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:%TAGFILE%" SET CDDRIVE=%%i:& GOTO DPsFound
:DPsFound

CD\WXPS\OEM\DP_Install_Tool.cmd and WXPS\OEM\DP_Install_Tool.cmd, added 1 line before the last IF:

FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO (
 IF Exist "%%i:\OEM\bin\un7zip.exe" SET "DPLoc=%%i:\OEM" & Set "M=2"
 IF Exist "%%i:\$OEM$\$1\D\"   SET "DPLoc=%%i:\$OEM$\$1" & Set "M=1" & %%i
 IF Exist "%%i:\CD\WXPS\OEM\bin\un7zip.exe" SET "DPLoc=%%i:\CD\WXPS\OEM" & Set "M=2"
 IF "%M%">="1" GoTo Found)

Any help would be very appreciated wink

Last edited by johnye_pt (2012-12-04 08:30:46)

Re: How to modify batches to work from different folders?

johnye_pt wrote:

CD\WXPS\I386\presetup.cmd and WXPS\presetup.cmd, added 1 line after the SET command:

SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:\CD\WXPS\OEM SET CDDRIVE=%%i:\CD\WXPS & GOTO DPsFound
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:%TAGFILE%" SET CDDRIVE=%%i:& GOTO DPsFound
:DPsFound

Your first "for" loop is missing the end-quotes.  Change to read as below:

SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:\CD\WXPS\OEM" SET "CDDRIVE=%%i:\CD\WXPS" & GOTO DPsFound
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO DIR %%i: && IF EXIST "%%i:%TAGFILE%" SET "CDDRIVE=%%i:" & GOTO DPsFound
IF EXIST "\$win_nt$.~ls" SET CDDRIVE=\$win_nt$.~ls
:DPsFound
johnye_pt wrote:

CD\WXPS\OEM\DP_Install_Tool.cmd and WXPS\OEM\DP_Install_Tool.cmd, added 1 line before the last IF:

FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO (
 IF Exist "%%i:\OEM\bin\un7zip.exe" SET "DPLoc=%%i:\OEM" & Set "M=2"
 IF Exist "%%i:\$OEM$\$1\D\"   SET "DPLoc=%%i:\$OEM$\$1" & Set "M=1" & %%i
 IF Exist "%%i:\CD\WXPS\OEM\bin\un7zip.exe" SET "DPLoc=%%i:\CD\WXPS\OEM" & Set "M=2"
 IF "%M%">="1" GoTo Found)

Here's a more refined expression of your mods:

FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO (
 IF Exist "%%i:\OEM\bin\un7zip.exe" SET "DPLoc=%%i:\OEM" & Set "M=2"
 IF Exist "%%i:\$OEM$\$1\D\" (SET "DPLoc=%%i:\$OEM$\$1" & Set "M=1" & %%i)
 IF Exist "%%i:\CD\WXPS\OEM\bin\un7zip.exe" (SET "DPLoc=%%i:\CD\WXPS\OEM" & Set "M=2")
 IF "!M!" GEQ "1" GoTo Found
)
Read BEFORE you post.  HWID tool   DriverPacks Tutorial   DONATE!
http://driverpacks.net/userbar/admin-1.png
Not all heroes wear capes, some wear Kevlar!

Re: How to modify batches to work from different folders?

mr_smartepants wrote:

Your first "for" loop is missing the end-quotes.  Change to read as below:

SET TAGFILE=\OEM
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%i:\CD\WXPS\OEM" SET "CDDRIVE=%%i:\CD\WXPS" & GOTO DPsFound
FOR %%i IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO DIR %%i: && IF EXIST "%%i:%TAGFILE%" SET "CDDRIVE=%%i:" & GOTO DPsFound
IF EXIST "\$win_nt$.~ls" SET CDDRIVE=\$win_nt$.~ls
:DPsFound

Thanks, I also noticed that last night but could only test it this morning. Tested and working wink