![]() |
![]() ![]() |
Apr 23 2007, 09:36 AM
Post
#1
|
|
|
Silver Member ![]() ![]() ![]() Group: Members Posts: 111 Joined: 18-September 05 Member No.: 14,166 |
Hi, I use isolinux for my bootable cd. I want to pass parameters to memdisk so i can have one single image and multiple dos apps in different folders.I've read this thread http://www.911cd.net/forums//index.php?showtopic=5706 but it doesn't seem to work or i'm missing something. Can someone provide clear information about this subject or maybe a simpler way to pass parameters to medisk? Thank you
|
|
|
|
Apr 23 2007, 09:54 AM
Post
#2
|
|
|
Platinum Member ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 4,579 Joined: 25-July 04 From: Italy Member No.: 6,779 |
The post you refer to seems clear enough.
Why don't you post a detailed description of WHAT you tried doing, plus YOUR autoexec.bat, dir listing of the contents of YOUR floppy, isolinux lines you used, maybe someone can spot the problem. jaclaz -------------------- - Fighting against bloatware since 2004, and proud of it. -
|
|
|
|
Apr 23 2007, 01:38 PM
Post
#3
|
|
|
Silver Member ![]() ![]() ![]() Group: Members Posts: 111 Joined: 18-September 05 Member No.: 14,166 |
QUOTE The post you refer to seems clear enough. Why don't you post a detailed description of WHAT you tried doing, plus YOUR autoexec.bat, dir listing of the contents of YOUR floppy, isolinux lines you used, maybe someone can spot the problem. OK, here is autoexec.bat file: CODE SET EXPAND=YES SET DIRCMD=/O:N set RAMDRIVE=empty set CDROM= empty set PATH=%path%;A:\ A:\mdiskchk | FIND "run=" > A:\TEMP.BAT CALL A:\TEMP.BAT :CDROM SET CDROM=L LH A:\MSCDEX.EXE /D:mscd001 /L:%CDROM% IF NOT "%run%"=="" GOTO %run% :RAMDRIVE SET RAMDRIVE=R XMSDSK 16384 %RAMDRIVE%: /y SET TEMP=%RAMDRIVE%:\ SET TMP=%RAMDRIVE%:\ SET path=%PATH%;%RAMDRIVE%:\;%RAMDRIVE%:\cmospwd;%RAMDRIVE%:\gdisk IF NOT "%run%"=="" GOTO %run% :FPROT IF "%CDROM%"=="vide" GOTO CDROM IF "%RAMDRIVE%"=="vide" GOTO RAMDRIVE cls echo Extracting F-Prot Anti-Virus echo Please wait... extract /y /e /l %RAMDRIVE%: %CDROM%:\utils\cabs\fprot.cab unzip %CDROM%:\utils\cabs\fp-def.zip -d %RAMDRIVE%:\ unzip %CDROM%:\utils\cabs\macrdef2.zip -d %RAMDRIVE%:\ %RAMDRIVE%:\f-prot.exe GOTO QUIT :QUIT restart :end isolinux.cfg: CODE DEFAULT /boot/isolinux/vesamenu.c32 PROMPT 0 #### MENU BACKGROUND /boot/isolinux/splash.png MENU TITLE test #### #### The 1st byte of the fgnd color is brightness. #### MENU COLOR title 1;36;44 #CC0000 #00000000 std #### MENU COLOR unsel 37;44 #0099FF #00000000 std #### MENU COLOR sel 7;37;40 #c0ffffff #666666 std #### MENU COLOR hotkey 1;37;44 #0099FF #00000000 std #### MENU COLOR hotsel 37;44 #ff00ff00 #666666 all #### MENU color border 7;37;40 #c0ffffff #00000000 std #### MENU COLOR help 1;37;44 #ffff0000 #00000000 std #### MENU COLOR tabmsg 1;37;44 #c0ffffff #00000000 std #### MENU WIDTH 78 #### MENU MARGIN 14 #### MENU ROWS 13 #### MENU TABMSGROW 25 #### MENU TIMEOUTROW 25 #### LABEL Test MENU LABEL 1 Test KERNEL /boot/isolinux/memdisk APPEND initrd=setup98.img run=FPROT config.sys: CODE [menu] menuitem=SETUP_CD, Start Windows 98 Setup from CD-ROM. menuitem=CD, Start computer with CD-ROM support. menuitem=NOCD, Start computer without CD-ROM support. menudefault=SETUP_CD,30 menucolor=7,0 [SETUP_CD] device=himem.sys /testmem:off device=oakcdrom.sys /D:oemcd001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:oemcd001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:oemcd001 [CD] device=himem.sys /testmem:off device=oakcdrom.sys /D:oemcd001 device=btdosm.sys device=flashpt.sys device=btcdrom.sys /D:oemcd001 device=aspi2dos.sys device=aspi8dos.sys device=aspi4dos.sys device=aspi8u2.sys device=aspicd.sys /D:oemcd001 [NOCD] device=himem.sys /testmem:off device=oakcdrom.sys /D:mscd001 device=himem.sys /testmem:off FILES=60 BUFFERS=40 lastdrive=z dos=high,umb stacks=9,256 lastdrive=z [COMMON] files=60 buffers=20 dos=high,umb stacks=9,256 lastdrive=z iso screenshot (in cabs folder there is fprot.cab): ![]() command line output: ![]() setup98.img: ![]() Any ideas? |
|
|
|
Apr 24 2007, 06:48 AM
Post
#4
|
|
|
911cd's Boyscout ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,107 Joined: 18-November 03 From: Skaro Member No.: 2,631 |
There are no references to the tags in your autoexec?
What sets the %run% environment variable? The last post in the thread you referenced (mine) is a entirely different way to use the command passed with memdisk. It actually sets the %run% environment variable, which can be called from the autoexec without creating a new batch file. In your case, you'd need a batch to unzip the f-prot stuff and run it. -------------------- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams
Problems? Check the Troubleshooting FAQ |
|
|
|
Apr 24 2007, 08:53 AM
Post
#5
|
|
|
Silver Member ![]() ![]() ![]() Group: Members Posts: 111 Joined: 18-September 05 Member No.: 14,166 |
QUOTE There are no references to the tags in your autoexec? What sets the %run% environment variable? The last post in the thread you referenced (mine) is a entirely different way to use the command passed with memdisk. It actually sets the %run% environment variable, which can be called from the autoexec without creating a new batch file. In your case, you'd need a batch to unzip the f-prot stuff and run it. It's just copy-paste from the thread mentioned nothing more, it clearly does not work. If you know a better method and perhaps simpler please enlight me becasue my knowledge about batch files is very limited (I must learn This post has been edited by google: Apr 24 2007, 08:53 AM |
|
|
|
Apr 24 2007, 12:36 PM
Post
#6
|
|
|
Platinum Member ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 4,579 Joined: 25-July 04 From: Italy Member No.: 6,779 |
Change this two lines in autoexec.bat:
CODE A:\mdiskchk | FIND "run=" > A:\TEMP.BAT CALL A:\TEMP.BAT into: CODE A:\mdiskchk | FIND "run=" > A:\TEMP.BAT ECHO Begin contents of A:\TEMP.BAT COPY A:\TEMP.BAT CON ECHO End contents of A:\TEMP.BAT PAUSE CALL A:\TEMP.BAT and check if the "run=FPROT" is actually item #6, or however check in cmdline.bat the number after % corresponds to the position you have on temp.bat. If it doesn't work, post the output you have (between "Begin contents of A:\TEMP.BAT" and " End contents of A:\TEMP.BAT") I'll have to think a bit about it, but I think it should be possible to make a better parsing routine, independent from position of the "run=FPROT" jaclaz -------------------- - Fighting against bloatware since 2004, and proud of it. -
|
|
|
|
Apr 24 2007, 01:32 PM
Post
#7
|
|
|
Silver Member ![]() ![]() ![]() Group: Members Posts: 111 Joined: 18-September 05 Member No.: 14,166 |
First, thank you for your help, jaclaz. I changed in cmdline from position 6 to position 1 because my test item was on position 1.
Here is the 1'st screen output: ![]() 2'nd screen output: ![]() QUOTE I'll have to think a bit about it, but I think it should be possible to make a better parsing routine, independent from position of the "run=FPROT" Maybe here in this post is a possible solution http://www.911cd.net/forums//index.php?s=&...ost&p=33342 |
|
|
|
Apr 25 2007, 04:32 AM
Post
#8
|
|
|
Platinum Member ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 4,579 Joined: 25-July 04 From: Italy Member No.: 6,779 |
I don't get it.
You were trying to CODE SET run=FPROT weren't you? By using %1 you got CODE SET run=initrd Try using %4.... Change cmdline.bat from: CODE SET run=%1 to: CODE ECHO Parameter 1 is %1 ECHO Parameter 2 is %2 ECHO Parameter 3 is %3 ECHO Parameter 4 is %4 ECHO Parameter 5 is %5 ECHO Parameter 6 is %6 ECHO Parameter 7 is %7 PAUSE SET run=%4 Also, why it cannot find the CD-rom? ALL your entries in config.sys (including the NOCD one About parsing, I was rather thinking about using the SHIFT command.... jaclaz -------------------- - Fighting against bloatware since 2004, and proud of it. -
|
|
|
|
Apr 25 2007, 06:54 AM
Post
#9
|
|
|
911cd's Boyscout ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,107 Joined: 18-November 03 From: Skaro Member No.: 2,631 |
Just to be clear on this, my method works.
![]() I forgot why I put that \W in there now. This will also work: (run=(.*)) = \2 This post has been edited by d4vr0s: Apr 25 2007, 07:02 AM -------------------- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams
Problems? Check the Troubleshooting FAQ |
|
|
|
Apr 25 2007, 08:03 AM
Post
#10
|
|
|
Platinum Member ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 4,579 Joined: 25-July 04 From: Italy Member No.: 6,779 |
QUOTE (d4vr0s) Just to be clear on this, my method works. Yep, I am sure it does. I was just trying to help google by trying to also make him learn something about batch files, rather than simply copying a pre-made solution. Besides, as soon as I have time, I want to have a closer look at the matter, since I am convinced that one could get rid of the external programs: QUOTE (d4vros) It requires minitrue and xset You know how it is with batch, it is addictive once you start: http://www.911cd.net/forums//index.php?sho...18291&st=50 jaclaz -------------------- - Fighting against bloatware since 2004, and proud of it. -
|
|
|
|
Apr 25 2007, 08:16 AM
Post
#11
|
|
|
911cd's Boyscout ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 3,107 Joined: 18-November 03 From: Skaro Member No.: 2,631 |
@jaclaz, my comment was not directed at you
I understand your reasoning on trying to get rid of external programs, but sometimes it seems the script code starts getting a little out of hand. Anyway, no hard feelings .. just wanted to show how the minitrue method worked. -------------------- A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools. Douglas Adams
Problems? Check the Troubleshooting FAQ |
|
|
|
Apr 27 2007, 01:19 PM
Post
#12
|
|
|
Platinum Member ![]() ![]() ![]() ![]() ![]() Group: Moderator Posts: 4,579 Joined: 25-July 04 From: Italy Member No.: 6,779 |
OK, this is what I came out with:
dotest.bat : CODE mdiskchk.com | FIND "cmdline" > test.bat ::The above line is to be inserted into autoexec.bat ::Following lines are just for test @ECHO OFF copy test.bat CON ECHO. ECHO call test.bat call test.bat ECHO The output of mdiskchk.com should have been parsed successfully ECHO assigning environment variables to all found parameters.... :) cmdline.bat : CODE @ECHO OFF ::Following line can be removed, only needed to test ECHO. ::Above line can be removed, only needed to test :PARSE SET %1=%2 ::Following line can be removed, only needed to test ECHO SET %1=%2 ::Above line can be removed, only needed to test SHIFT SHIFT IF NOT %1.==. GOTO :PARSE ::Following line can be removed, only needed to test ECHO. ::Above line can be removed, only needed to test test screenshot : ![]() No animals were harmed in the making of this, no external programs are needed and ALL parameters passed into environment variables.... jaclaz -------------------- - Fighting against bloatware since 2004, and proud of it. -
|
|
|
|
![]() ![]() |
| Lo-Fi Version | Time is now: 8th February 2010 - 08:45 PM |