@google44
I nearly forgot.... NwDsk...
The reason your using that FreeDOS NwDsk image is to execute apps from your boot CD/DVD, hens why there is a folder called 'dosapps' on the UBCD disc.
Basically all you've got is a modular DOS boot disc that you can add as many drivers as you want to, to achieve your goal i.e sata,aspi,usb,keyboard(if your not in the US),mouse,DPMI etc and some utils if you like.
Personally I don't want or need a networking DOS boot disc so I ripped all of that out. I also removed NTFS and LFN support as well as Volkov Commander for the same reasons.
To do this I took the FreeDOS UBCD NwDsk 3.42 from Erwin's site (you need to look in the beta section) and just started cutting.
You really need to read the little section about how the boot process works i.e. what level you want you're cab's at and you need to look at what each cab contains. This may take a while but once you've got the general idea about how this works you'll realise it's quite simple, for the user anyway.
The next part is easier than you might think.
The first thing you want to happen after all your drivers and stuff are load is to find your boot CD/DVD and set a variable for it . You can do this quite simply with a command like this:
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 Z) do if exist %%i:\autorun.inf set bootdrv=%%i:
This command basically looks at all your drives for a file called autorun.inf at the root of it and sets a variable called %bootdrv%.
The second thing you want to happen is to execute your app. This is also rather simple and wouldn't be possible without using memdisk.
Whist booting your FreeDOS image it is possible to set an environment variable that is recognised in DOS.
Some thing like this:
LABEL hdat2
MENU LABEL HDAT2 4.52
KERNEL memdisk
APPEND initrd=boot/freedos.igz setup=hdat2
The bit your interested in is
setup=hdat2, that is your variable!
From there it's just a question of how to use it. Now this is were I confess I have stolen some idea's from UBCD.
Here is my entire setup.bat that is execute by autorun3.bat. Autorun3.bat is contained in the 'etc' folder on the NwDsk
and executes what ever you want at the end of the boot process. I chose to launch my setup.
@if "%debug%"=="" echo off
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 Z) do if exist %%i:\autorun.inf set bootdrv=%%i:
if "%bootdrv%"=="" goto _msg
%bootdrv%
cd \
if "%setup%"=="" goto _msg
if not exist \dostools\%setup%\setup.bat goto _msg
cd \dostools\%setup%
call setup.bat
goto _end
:_msg
echo.
echo Floppy Drive = %srcdrv%
echo Ram Drive = %ramdrv%
echo Boot Drive = %bootdrv%
echo.
:_end
It's not the best batch in the world but it does the job. Finds my boot DVD finds the app I want to execute by it's folder name and launches it.
the batch contained in that folder can do this how ever you like I chose to keep all my apps in zip files and decompress them into ram for use but it's up to you.
Here's an example:
@echo off
cls
unzip -qq -uo estest.zip -d %ramdrv%\estest\
%ramdrv%
cd \estest
estest.exe /?
There's alot more to it than this including tweaking settings here and there, but I feel I might drown you with info at the mo.
Have a mess around with it and if you have any specific questions drop me a line.
-kof94