Author Topic: In Need Of Help From A Batch-programmer  (Read 929 times)

[ guest ]

  • Guest
In Need Of Help From A Batch-programmer
« on: April 19, 2003, 01:17:31 PM »
Hi.

I’m thinking of putting together a bootable CD that contains handy DOS tools.
As boot menu system, I’m thinking of using the boot scriptor ( http://www.bootscriptor.org ) or Barts ( http://www.nu2.nu/diskemu/ ). When an option is selected from the menu, then a boot diskette image (a *.img image file, each tool will have it’s own img-file) loads a tool with ramdrive support. I’m thinking of having a partition manager etc on the CD, and as no partition shall have to be created, C: can’t therefore be used as temp dump.
What I need help with here is to write the batch-code for the Win9x boot diskette, it will have to transfer the files needed for a tool selected from the menu to the ramdrive and run it from there (as I understands it). When the tool has been exit, than I would like to be taken back to the boot menu (if that is a can do). I also like to have the CD-ROM drive set to %CD-ROM% not as D: or X: (something for the ramdrive).

I know I as for a lot of help here.
I’m more than happy with any kind of help I can get.

PS: please use this bootdiskette and post you modification in this thread, http://www.drd.dyndns.org/cgi-bin/cgirdir.exe?mtn04


Thanks in advice

Evilvoice

  • Guest
In Need Of Help From A Batch-programmer
« Reply #1 on: April 19, 2003, 03:26:39 PM »
Actually, you can not return to the menu, this is not soo much a problem, but as it stands you can not return to the actual bootmenu of diskemu or bootscriptor (in fact none of them will return)  Your best bet is to use a command called restart or reboot as these commands make the ocmputer reboot which in turn would then reload your bootmenu but you will not be able to access the first image.  So lets take an example to better explain.  If you say load bootscriptor and have it boot a w98se boot image, play with it for a while, then decide you wanted to load another boot image, so you issue the command restart, it loads up bootscriptor again, and you select that you wanna run pm7 (partition magic).  The boot image for w98se will be gone and all that will be loaded is whatever is contained in pm7.img.  Hope this helps.

Evilvoice

  • Guest
In Need Of Help From A Batch-programmer
« Reply #2 on: April 19, 2003, 03:29:04 PM »
Sorry for posting so quick, but I had something else to say too.  actually bootscriptor has been stopped and rereleased with more functionality and better enhancements under cdshell - www.cdshell.org (its made by the same person).  Diskemu has been stopped as Bart has gone on to work on other things, but his page www.nu2.nu offers many things more than just diskemu.  Another bootcd maker is Doctor XP - www.911cd.net.  If you wish you can talk to all 3 of them, as well as me at the forums for 911cd

Space Between

  • Guest
In Need Of Help From A Batch-programmer
« Reply #3 on: April 19, 2003, 10:05:12 PM »
Wow...what a change here..first time i seen the forum like this..i like it.

IS this website running of a unix type?? im guessing because of the carriage returns

anyways...on your script...you can do all that you want to with a bootdisk.

you SHOULD not have to go back to the boot menu.

Alot of the reasons' people think they NEED to do that is because of volume labels

some programs require volume labels...however. With xcopy and a utility out there that i cant
remember the name of...you can copy all your files to the ram drive and rename the volume label.

heres a rough go at your menu...this might be somewhat off because i have not made a win98 .bat
in about 6 months now.

put this in your autoexec.bat file...or better yet in its own .bat file and call it...then you would pass in
%1 %2 %3 .... and use shift incase you want to automate a startup routine...(quicker atleast)


@echo off
:_start
CLS
echo.
echo  Welcome to this menu
echo.
echo  Press a to start scandisk
echo  Press b to start partition magic
echo  Press c to start DAO32
echo  Press d to check if you have a ASPI installed (if not one will be installed to support burning)
echo  Press e to exit
echo  Press f to reboot (you will need reboot for this)
echo.
echo.
CHOICE \"Waiting forever for your choice...\" /C:abcdef
IF ERRORLEVEL=6 GOTO _reboot
IF ERRORLEVEL=5 GOTO _eof
IF ERRORLEVEL=4 GOTO _aspi
IF ERRORLEVEL=3 GOTO _dao
IF ERRORLEVEL=2 GOTO _pmagic
IF ERRORLEVEL=1 GOTO _scandisk
CLS
echo.
echo  Invalid choice...press any key and try again
pause >nul
GOTO _start
::
:: try not to use empty lines in .bat files and :: is a better and more universal comment than REM..plus 1 less byte...http://images.thetechguide.com/forum/public/style_emoticons/<#EMO_DIR#>/smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />...dos isnt that big http://images.thetechguide.com/forum/public/style_emoticons/<#EMO_DIR#>/smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
:_reboot
reboot.exe
GOTO _start
:: The above really dont matter i guess http://images.thetechguide.com/forum/public/style_emoticons/<#EMO_DIR#>/smile.gif\' class=\'bbc_emoticon\' alt=\':)\' />
:_aspi
CALL aspi.bat
:: put a decent aspi manager in the above .bat file
GOTO _start
:_dao
dao16.exe
:: this is a burning app...can be found at www.goldenhawk.com...16bit version is needed for dos
GOTO _start
:_pmagic
echo.
echo  Preparing to start partition magic
xcopy %cdrom%:\pmagic\*.* %ramdrive%:\ >nul
lable.exe x: %whatevertheneededvolumelabelIs%
:: In the above there is a work around for this so you dont need to change the V.Label..ive never done it though
GOTO _start
:_scandisk
scandisk.exe
GOTO _start

:_end
echo.
echo  Thanks for shopping...due come again
echo.
ping 127.0.0.1 >nul
:: you dont need to use ping...you can create a delay with the CHOICE.COM's timeout switch...or use ping
FOR %%i IN (%ramdrive%:\*.*) DO DEL %%i >nul
exit