It is currently Sat Oct 25, 2014 1:11 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Thu Aug 14, 2008 9:12 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Okay, following some discussion I've decided to address some concerns regarding automation and manageability for the next update:

1) Banishing those annoying "dosapp" batch files
For ubcd4.11, these are currently to be found in:
Code:
/dosapps/<application name>/startup.bat

For ubcd5b...
Code:
/ubcd/dosapps/<application name>/startup.bat

Not very practical or easy to manage. Instead, I decided to remove all those startup.bat files and replace them with the following file(s):

/main.ini
Code:
;Comments
;
[Category 1]
fjdt     ;fjdt.exe                    ;-   ;Fujitus Diagnostic Tool 7.00 (Fujitsu)
dfsee    ;dfsdos.exe                  ;-   ;DFSee 9.10 (Evaluation Version)
copywipe ;copywipe.exe                ;-   ;CopyWipe 1.14
;
[Category2]
intelfid ;BFREQIDE.COM                ;-   ;Intel Processor Frequency ID V7.2.20041115
intelpiu ;BPROCIDE.COM                ;-   ;Intel Processor Identification Utility V3.8.20080505
chkdskg  ;CHKDSKG.EXE                 ;-   ;Avira NTFS4DOS Repair Utility 1.9
dfrgntfs ;DFRGNTFS.EXE                ;-   ;Avira NTFS4DOS Defragment Utility 1.9
readntfs ;READNTFS.EXE                ;-   ;Active NTFS Reader 1.03
pwmx423  ;"callver 6.20 POWMX423.EXE" ;-   ;PowerMax 4.23 (Maxtor/Quantum)
pwmx409  ;"callver 6.20 POWMX409.EXE" ;-   ;PowerMax 4.09 (Maxtor/Quantum)
mhdd45   ;"mhdd.exe /enableprimary"   ;-   ;MHDD32 4.5
mhdd46   ;"mhdd.exe /enableprimary"   ;-   ;MHDD32 4.6
;
[Category 3]
dft      ;"dft.exe /PSR"             ;-   ;Drive Fitness Test 4.14 (IBM/Hitachi)
ftool    ;ftool.exe                  ;-   ;IDE/ATA Feature Tool 2.10 (IBM/Hitachi)
hddreg   ;hddreg.exe                 ;-   ;HDD Regenerator 1.5 (Shareware)
pcconfig ;config.exe                 ;-   ;PC-Config V9.33
...
...and so on


/usr.ini
(optional for users wishing to customise their distribution)
Code:
;Comments
;
[Custom]
sdisk    ;sdisk.exe                     ;-   ;EASEUS DOS Partition Manager
;


Image

Then, using a nested loop function, we can create the batch files dynamically...

Code:
for %%i in (%tmp%\~bin) do if not exist %%i mkdir %%i
set _i=0
set _j=0
call var set _m=lines %tmp%\_ubcd.bak
:_loop_i
  ::
  call var set _i=(%_i%+1)
  lmod /l%_i% []<%tmp%\_ubcd.bak | stow _cnt >%tmp%\nul
  inifile %home%\cdapp.cfg [%_cnt%] | lmod /l* /s [$2:$!] ; %_cnt% >%tmp%\_ubcd.dat
  call var set _n=lines %tmp%\_ubcd.dat
  @rem pause
    ::
    :_loop_j
      call var set _j=(%_j%+1)
      lmod /l%_j% /s; @set _$app=[$4:$!-1][+]@set _$appcmd=[$2][+]@set _$apparc=[$1][+]@set _$appmnu=[$3]<%tmp%\_ubcd.dat >%tmp%\~bin\_ubcd.bat
      call %tmp%\~bin\_ubcd.bat
      if exist %tmp%\~bin\%_$apparc%.bat goto _skip_j
      ren %tmp%\~bin\_ubcd.bat %_$apparc%.bat
      :_skip_j
    @rem pause
    if "%_j%"=="%_n%" goto _end_j
    goto _loop_j
    :_end_j
    ::
     for %%i in (_j _n) do set %%i=
  if "%_i%"=="%_m%" goto _end_i
  goto _loop_i
  ::
:_end_i
for %%i in (_$app _$appcmd _$apparc _$appmnu) do set %%i=
for %%i in (_i _m _cnt) do set %%i=
for %%d in (%tmp%\~bin\*.bat) do echo @runapp.bat >>%%d


Image

Image

...and here's the result:

Image

Image

Image

Hopefully, Victor will approve of this method for the next beta. At the very least, I'll include support for this functionality in the next release.

2) Customising the default dosapp folder
What I have decided to do is supply 2 locations from which freedos will search for dosapps - main and user. In order to allow users the flexibility to customise and declare their own locations, I've decided to employ the use of a global INI file which users can change to set their own paths.

ubcd.ini
(place this anywhere on the CD)
Code:
;Comments
;
[Version]
Signature         = $Ubcd$
Version           = 5.0.b
Url               = http://www.ultimatebootcd.com/
[Settings]
;For UBCD 5.0b
ProgramRootDirectory      = \ubcd\dosapps\main
ProgramUserDirectory      = \ubcd\dosapps\usr
;For UBCD 4.1.1
;ProgramRootDirectory      = \dosapps
;ProgramUserDirectory      = \dosapps\usr


Simply change these as required and dosubcd.img will search these paths instead (omitting this file entirely will simply set the paths to their default locations).


Last edited by as702 on Sat Aug 16, 2008 4:33 am, edited 5 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 9:19 am 
Offline

Joined: Fri Jan 11, 2008 2:52 pm
Posts: 1278
as702 wrote:
/dosapp.ini
Code:
;Comments
;
[Category 1]
fjdt     ;fjdt.exe                    ;-   ;Fujitus Diagnostic Tool 7.00 (Fujitsu)
dfsee    ;dfsdos.exe                  ;-   ;DFSee 9.10 (Evaluation Version)
copywipe ;copywipe.exe                ;-   ;CopyWipe 1.14
;
[Category2]
intelfid ;BFREQIDE.COM                ;-   ;Intel Processor Frequency ID V7.2.20041115
intelpiu ;BPROCIDE.COM                ;-   ;Intel Processor Identification Utility V3.8.20080505
....................
;
[Category 3]
dft      ;"dft.exe /PSR"             ;-   ;Drive Fitness Test 4.14 (IBM/Hitachi)
ftool    ;ftool.exe                  ;-   ;IDE/ATA Feature Tool 2.10 (IBM/Hitachi)
hddreg   ;hddreg.exe                 ;-   ;HDD Regenerator 1.5 (Shareware)
pcconfig ;config.exe                 ;-   ;PC-Config V9.33
...
...and so on

What are the criteria for placing a program in a certain category? If not based on some settings that must be present, it maybe makes more sense to call them [Category "HD tools"], ... similar to the menus in the isolinux config file (more or less).

You maybe have the same idea to figure out the version of UBCD that is on the CD. Just look for the version name in the ubcd.ini.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 15, 2008 11:23 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Icecube wrote:
What are the criteria for placing a program in a certain category?

User criteria. The idea is for Victor to hopefully adopt this technique in order to replace the existing method. The names I've shown are arbitrary (I simply wasn't going to type out +50 programs under relevant categories for the sake of demonstration).

Icecube wrote:
You maybe have the same idea to figure out the version of UBCD that is on the CD. Just look for the version name in the ubcd.ini.

Great minds. It's already in the build I'm working on.

(-:


Top
 Profile  
 
 Post subject: New Icon
PostPosted: Sat Aug 16, 2008 5:10 am 
Offline

Joined: Sat Mar 22, 2008 6:04 am
Posts: 48
Icecube

I have remove the icon and installed my own icon using Icon Edit :wink:


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 16, 2008 6:10 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Image


Top
 Profile  
 
 Post subject: Thank You
PostPosted: Sat Aug 16, 2008 12:18 pm 
Offline

Joined: Sat Mar 22, 2008 6:04 am
Posts: 48
as702

Image

Thank you Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 11:34 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Just a quick musing...

I may decide to handle the detection of the dosapps folder(s) and/or archive(s) dynamically instead of relying on users to declare where they wish to set the relative path of the application in question. For instance, the development version I have running relies on using an INI file to set the directories...
Quote:
[Settings]
ProgramRootDirectory = \ubcd\dosapps
ProgramUserDirectory = \ubcd\dosapps\usr


Instead, I can create a LUT from within dosubcd.img whilst setting the cd drive...
Code:
:_testdrv
shift
shift
if not "%cddrv%"=="" goto _eof
if "%1"==""  goto _eof
if "%1"==":" goto _eof
call drd.bat %1 -$
if errorlevel 255 goto _eof
if errorlevel 100 goto _eof
getargs | lmod /l1 /s=/ [$!] | stow _i >%tmp%\nul
dir /s /b %1 >%home%\index.dat
type %home%\index.dat | xgrep -shy %_i%$ >%tmp%\nul
if not errorlevel 1 set cddrv=%1
set _i=
goto _eof


index.dat contains the entire directory/file structure of our CD. Using this file, I can now dynamically search the relevant application during runtime (i.e. users can place their archives wherever the hell they please).

There a little more error handling involved, but I believe this to be the best strategy(?).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 1:26 pm 
Offline

Joined: Fri Jan 11, 2008 2:52 pm
Posts: 1278
as702 wrote:
index.dat contains the entire directory/file structure of our CD. Using this file, I can now dynamically search the relevant application during runtime (i.e. users can place their archives wherever the hell they please).

I don't think that this is a good idea. Scanning the cd will take to long. It gives also problem when ubcd is put on a usb stick. Most people add some personal files, which have nothing to do with ubcd, on the usb stick. If they put a zip archive to it, it will get listed in the menu as a program. As long as they put the files in the usr directory, they don' have to change the ini. For a beautiful menu you already have to edit the ini file, so changing the path for the custom folder in that file isn't so much work.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 2:01 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Icecube wrote:
as702 wrote:
index.dat contains the entire directory/file structure of our CD. Using this file, I can now dynamically search the relevant application during runtime (i.e. users can place their archives wherever the hell they please).


Icecube wrote:
Scanning the cd will take to long.

It's a one-off operation. I do concede that I haven't tested it on a real system though (I may try this to see and compare times).

Icecube wrote:
Most people add some personal files, which have nothing to do with ubcd, on the usb stick. If they put a zip archive to it, it will get listed in the menu as a program.

It doesn't affect the menu (the INI file explicitly states the archive prefix and executable from which to build the menu with). If a duplicate archive is discovered when users attempt to launch an application, the script can scan each file in order to determine the correct archive to process. This particular aspect is not really so much an issue.

Icecube wrote:
For a beautiful menu you already have to edit the ini file, so changing the path for the custom folder in that file isn't so much work.
True. But it's one less set of variables for users to worry about (especially me).

Tricky one...


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 5:44 pm 
Offline

Joined: Mon Feb 21, 2005 10:59 pm
Posts: 1294
BTW, is there a text pager like MORE.COM in the FreeDOS boot disk?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 6:46 pm 
Offline

Joined: Mon Feb 21, 2005 10:59 pm
Posts: 1294
@as702: When I updated to R1.28, whenever I try to launch a DOS app, I get an error message eg. intelfid.bat not found.

Couldn't find anything mentioned in your changelog. Is there something I am missing?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 17, 2008 11:51 pm 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Victor Chew wrote:
whenever I try to launch a DOS app...

From the menu or from the command prompt?? does the batch file ACTUALLY exist (check the bin directory).

Do you receive any prior error messages? Did you make any significant changes to the CD? (it works on stock 4.11 and 5.0b4)

...in the command prompt, type "set debug=1" and then run the dosapp in question. you can use scroll-lock to then scroll up/down the page to view what's going. let me know what it says....

Quote:
is there a text pager like MORE.COM

no


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 19, 2008 9:14 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
UMBPCI release 3.77 is out.
http://www.uwe-sieber.de/umbpci_e.html

Quote:
Support for SiS 671

It will be included in the next NwDsk release (i.e. this coming week).


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 23, 2008 2:28 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
I've been examining the NwDsk ramdisk driver(s)...

SHSURDRV
Syntax:
Code:
SHSURDRV [/D][size][Ssectors][Ccluster][Dentries][Ffats][$[label],][drive]]


XMSDSK
Syntax:
Code:
XMSDSK <size in Kbytes> /y [/c ##] [/t]


Either driver can be used (SHSURDRV takes precedence if found). Currently, XMSDSK is being used...

Autoexec.bat
Quote:
:_shsurdrv
shsurdrv /D:%ramsz%K,%ramdrv% /T /Q
if errorlevel 1 if not errorlevel 255 goto _ramok
goto _abort
:_xmsdsk
xmsdsk %ramsz% %ramdrv% /y /t >nul
if errorlevel 1 goto _ramok
goto _abort


I've observed stability issues and "Invalid cluster nr." errors in certain instances. As it turns out, the problem had to do with neither driver being set a default/valid cluster size. Ideally, the sector size should be set to 512 bytes. I modified the above to account for this...

Quote:
:_shsurdrv
shsurdrv /D:%ramsz%K,%ramdrv%,C0 /T /Q
if errorlevel 1 if not errorlevel 255 goto _ramok
goto _abort
:_xmsdsk
xmsdsk %ramsz% %ramdrv% /y /t /c1 >nul
if errorlevel 1 goto _ramok
goto _abort


This appears to have corrected the problem (and SHSURDRV now works without issue).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 25, 2008 8:49 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
R1.31 (now available)

Quote:
adjusted NwDsk version number (3.42=>3.40)
updated UMBPCI to 3.77
adjusted ramdisk:
- set ramdisk XMSDSK/SHSURDRV sector size from 0(?) to 512 bytes
- replaced XMSDSK with SHSURDRV v1.10
replaced unzip.exe with pkunzip.exe (PKWARE 2.50 for DOS) ~20Kb smaller
- adjusted autoexec.bat, runapp.bat and unpack.bat to refelct change
adjusted /level3 post-processing
- adjusted cd drive detection routine (e.g. no longer dependent on ubcd.ico)
- NwDsk settings can now be supplemented via an .INI file
- relative path(s) of dosapps no longer dependent on UBCD version*
- can now choose to launch CD dosapps as an archive or unpacked as a directory**
- launching CD dosapps is no longer dependent on "dosapp" root directory (NwDsk will find it)**
adjusted UBCD program handling
- automatically finds the program archive/directory regardless of location**
- added archive support to include rar,7z and uha in addition to cab and zip
adjusted saveset.bat in utilz.cab
removed ranish partition manager (already included on CD)
fixed an error in cdrom loader for non-eltorito drives : "_devld not found"
replaced stype.exe with more.exe (~18Kb smaller)
added mdir.exe (consistent DIR command across FD/DR/MS platforms)
fixed other tiny errors

* Feature-ready, but not yet implemented for legacy support
**UBCD 5beta only

Development Notes
All previous versions of NwDsk (R series) relied on a rather cumbersome detection routine for determining UBCD version number which, in turn, was used as a requisite in establishing variables and parameters used for post-processing operations (e.g. menu generation, application handling etc). Previously, this was handled using information from the following file:

Code:
\menus\defaults.cfg

Code:
MENU TITLE Ultimate Boot CD V4.1.1                        http://www.ultimatebootcd.com
PROMPT 0
ALLOWOPTIONS 0
MENU MARGIN 0
MENU ROWS 20
MENU COLOR BORDER   37;44 #40000000 #00000000 std
MENU COLOR TITLE 1;33;44 #c00090f0 #00000000 std
MENU COLOR SCROLLBAR 37;44 #40000000 #00000000 std


Code:
\ubcd\menus\defaults.cfg

Code:
MENU TITLE Ultimate Boot CD V5.0B4                        http://www.ultimatebootcd.com

MENU MARGIN 0
MENU ROWS -9
MENU TABMSG
MENU TABMSGROW -3
MENU CMDLINEROW -3
MENU HELPMSGROW -4
MENU HELPMSGENDROW -1

MENU COLOR SCREEN 37;40
MENU COLOR BORDER 34;40
MENU COLOR TITLE 1;33;40
MENU COLOR SCROLLBAR 34;46
MENU COLOR SEL 30;47
MENU COLOR UNSEL 36;40
MENU COLOR CMDMARK 30;40
MENU COLOR CMDLINE 30;40
MENU COLOR TABMSG 37;40
MENU COLOR DISABLED 37;40
MENU COLOR HELP 32;40

Put simply, this method was arse and has since been been scrapped. Instead, the version number is now determined via 2 available methods...

1) CD VolumeID
For version 4.1.1, this should be set to "UBCD411" (for version 5.0b, "UBCD50bx" where x=1..4)
Image
2) Optional .INI file
Alternatively, use an INI file to supplement the correct version ID...

Quote:
;(use ";" to declare comments)
;
[Version]
Signature = $Ubcd$
Version = 4.1.1
Url = http://www.ultimatebootcd.com/

Two version will be supplied in the download (one for 4.1.1 and the other for 5beta). This can be placed anywhere on the CD and named anything you want provided it retains the *.INI suffix.

"That's nice, but how do I customise the location of my "dosapps" folder?"
Good question, chief. In previous builds, this proved almost impossible. For instance, suppose you wanted to relocate your "dosapp" programs from...
Code:
/ubcd/dosapps

to
Code:
/dos

NwDsk would return errors complaining about not being able to find the program folder. So, there are now 2 methods one can use to set the default program path...

1) From the NwDsk itself...
Code:
/etc/autoset.bat

Quote:
:: Ramdrive Letter (UpperCase!)
set ramltr=Q:
:: Ramdrive size (KB), put 0 to disable
set ramsz=16384
:: ScrollBackBuffer size (KB), put 0 to disable
set persz=512
:: TimeZone (optional)
set tz=GMT+1
:: Cache (KB)
set cachesz=6144
:: Cdrom Cache on FreeDOS (KB), put 0 to disable
set cachecd=1024
:: Uncomment to disable Diskette caching on FreeDOS
rem set tickle=0
:: Uncomment for Verbose Extracting
rem set xtrct=verbose
:: Uncomment to set "dosapps" Directories - [main;user]
rem set appdir=\ubcd\dosapps;\ubcd\dosapps\custom
rem set appdir=\dosapps;\dosapps\custom

2) Optional .INI file...
Quote:
[Settings]
MainPrograms = \ubcd\dosapps
UserPrograms = \ubcd\dosapps\custom

Use either method as you see fit.

DEMO:
Image
Note, if the program archive is not found in the given dosapp directories, the script will scan the entire CD to try and locate the archive dynamically (UBCD 5 only).

The two main scripts used to accomplish all this...
UBCD.BAT (WIP)
Code:
@if "%debug%"=="" echo off
if "%1"==":" if not "%2"=="" goto %2
::
for %%i in (xgrep.com concat.exe stow.exe varset.com var.bat) do if not exist %ramdrv%\bin\%%i %0 : _err missing %%i (check utilz.%arcext%)
for %%i in (wbat.com tfind.com lmod.com) do if not exist %ramdrv%\bin\%%i %0 : _err missing %%i (check utils.%arcext%)
:_start
if not "%cddrv%"=="" goto _init
if not exist %ramdrv%\bin\bcdw.com goto _nobcdw
bcdw.com CheckForBCDW
bcdw.com FindBootableCDLetter
bcdw.com GetBootImageCommandLine
if "%ubcdcmd%"=="" set ubcdcmd=%BCDW_CL%
:_bcdw
for %%i in (%cd1% %BCDW_CDROM%: %ramdrv% A:) do if "%cddrv%"=="" call %0 : _testdrv %%i
if not "%cddrv%"=="" goto _init
:_nobcdw
for %%i in (C D E F G H) do if "%cddrv%"=="" call %0 : _testdrv %%i:
for %%i in (I J K L M N) do if "%cddrv%"=="" call %0 : _testdrv %%i:
for %%i in (O P Q R S T) do if "%cddrv%"=="" call %0 : _testdrv %%i:
for %%i in (U V W X Y Z) do if "%cddrv%"=="" call %0 : _testdrv %%i:
if "%cddrv%"=="" goto _nocd
goto _init
:_testdrv
shift
shift
if "%1"==""  goto _eof
if "%1"==":" goto _eof
call drd.bat %1 -$
if errorlevel 255 goto _eof
if errorlevel 100 goto _eof
set | xgrep -shy ^[:u]?initrd[:p]?= | lmod /s=/ [$!] | stow _i >%tmp%\nul
mdir /s /b /o %1\ >%tmp%\_ubcd.bak
type %tmp%\_ubcd.bak | xgrep -shy %_i%$ >%tmp%\nul
if errorlevel 1 goto _nodrv
set cddrv=%1
copy %tmp%\_ubcd.bak %djdir%\index.dat /y >%tmp%\nul
:_nodrv
set _i=
goto _eof
:_info
echo.
if not "%ubcd_ver%"=="" echo UBCD %ubcd_ver% [%ubcd_ts%]
if not "%ubcd_url%"=="" echo %ubcd_url%
if "%ubcd_url%"=="" echo http:\\www.ultimatebootcd.com\
echo.
if "%os%"=="fd" date /t | lmod [$4:$5]
if "%os%"=="fd" time /t | lmod [$4:$5]
:_drives
echo ЪДДДДДДДДДДДДДДДДДДДДДї
echo і BOOTDRV: %srcdrv%         і
echo і RAMDRV:  %ramdrv%         і
if not "%cddrv%"=="" echo і CDDRV:   %cddrv%         і
echo АДДДДДДДДДДДДДДДДДДДДДЩ
goto _eof
::
:_init
call readset UBCD
if not "%ubcd_ver%"=="" goto _chkcmd
:_getini
xgrep -shy [:p]\ini$ %djdir%\index.dat >%tmp%\_ubcd.tmp
for %%e in (1 2 255) do if errorlevel %%e goto _noini
call var set _o=lines %tmp%\_ubcd.tmp
set _i=0
if exist %tmp%\_ubcd.bak del %_delq% %tmp%\_ubcd.bak
:_lp_ini
    call var set _i=(%_i%+1)
    linex %_i% <%tmp%\_ubcd.tmp | stow _f >%tmp%\nul
    xgrep -shy [$]?"Ubcd"[$]$ %_f% >%tmp%\nul
    if errorlevel 1 goto _skip_ini
    xgrep -syv ^; %_f% >%tmp%\_ubcd.bak
    call %0 : _ts %_f%
    set _f=
    :_skip_ini
  if exist %tmp%\_ubcd.bak goto _end_ini
  if "%_i%"=="%_o%" goto _end_ini
  goto _lp_ini
:_end_ini
@rem pause
for %%i in (_i _n _o) do set %%i=
if exist %tmp%\_ubcd.bak call %0 : _inird
:_noini
call %0 : _getver
for %%e in (255 1) do if errorlevel %%e goto _nover
if "%ver%"=="4" goto _oldver
if "%ver%"=="5" goto _oldver
goto _mkhlp
:_ts
shift
shift
echo UBCD: Scanning "%1"
call var set _d=date %1
call var set _t=time %1
set ubcd_ts=%_d% %_t%
for %%i in (d t) do set _%%i=
goto _eof
:_inird
:_iniver
inifile %tmp%\_ubcd.bak [Version] | lmod /l* /s [$2:$!]>%tmp%\_ubcd.tmp
xgrep -shy ^[:a]?Version[:s]?= %tmp%\_ubcd.tmp | lmod /s= @set ubcd_ver=[$2]>%tmp%\_ubcd.bat
xgrep -shy ^[:a]?Url[:s]?= %tmp%\_ubcd.tmp | lmod /s= @set ubcd_url=[$2] >>%tmp%\_ubcd.bat
inifile %tmp%\_ubcd.bak [Settings] | lmod /l* /s [$2:$!]>%tmp%\_ubcd.tmp
xgrep -shy ^[:a]?Menu[:s]?= %tmp%\_ubcd.tmp | lmod /s= @set _mkbat=[$2]>>%tmp%\_ubcd.bat
if not "%appdir%"=="" goto _inifin
xgrep -sry ^[:a]?MainPrograms[:s]?= %tmp%\_ubcd.tmp | lmod /s= %cddrv%[$2] | stow appdir >%tmp%\nul
xgrep -sry ^[:a]?UserPrograms[:s]?= %tmp%\_ubcd.tmp | lmod /s= @set appdir=%appdir%;%cddrv%[$2]>>%tmp%\_ubcd.bat
:_inifin
call %tmp%\_ubcd.bat
for %%d in (Version Settings) do inifile %tmp%\_ubcd.bak [%%d] /remove
type %tmp%\_ubcd.bak | xgrep -syv ^; >%djdir%\programs.cfg
call saveset UBCD -$
goto _eof
:_getver
if not "%ubcd_ver%"=="" goto _chkver
varset n=vol %cddrv% | lmod /b= [$2] | xgrep -shy ^[:a:d]?UBCD >%tmp%\_ubcd.tmp
if errorlevel 1 goto _nover
lmod /sD [$2]<%tmp%\_ubcd.tmp | stow ubcd_ver>%tmp%\nul
call saveset UBCD -$
:_chkver
echo %ubcd_ver% | lmod /s. [$1][$2]>%tmp%\_ubcd.tmp
lmod /s set _v=[1,2]<%tmp%\_ubcd.tmp >>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
call var set _v=(%_v%+1)
for %%e in (255 1) do if errorlevel %%e goto _eof
if "%_v%"=="51" set ver=5
if "%_v%"=="42" set ver=4
if "%_v%"=="11" set ver=?
set  _v=
if "%ver%"=="" el! 1
goto _eof
:_nover
goto _eof
:_mkhlp
xgrep -sy ^[[][:a:d:s]*[]]$ %djdir%\programs.cfg >%tmp%\_ubcd.tmp
if errorlevel 1 goto _chkcmd
lmod /l* /s[] [$1:$!]<%tmp%\_ubcd.tmp >%tmp%\_ubcd.bak
xgrep -syv ^[[][:a:d:s]*[]]$ %djdir%\programs.cfg >%tmp%\_ubcd.tmp
lmod /s; /l* [$4:$!]<%tmp%\_ubcd.tmp >%tmp%\_ubcd.tm#
lmod /s; /l* [$1]<%tmp%\_ubcd.tmp >%tmp%\_ubcd.tm$
concat %tmp%\_ubcd.tm$ %tmp%\_ubcd.tm# /f9 >%ramdrv%\help\ubcd.hlp
echo ubcd     Ultimate Boot CD>>%ramdrv%\help\ubcd.hlp
echo.>>%ramdrv%\help\ubcd.hlp
:_mkbat
set _i=0
set _j=0
call var set _m=lines %tmp%\_ubcd.bak
mkdir %tmp%\~bin
:_loop_i
  call var set _i=(%_i%+1)
  linex %_i% <%tmp%\_ubcd.bak | stow _cat >%tmp%\nul
  inifile %djdir%\programs.cfg [%_cat%] | lmod /l* /s [$2:$!]>%tmp%\_ubcd.dat
  call var set _n=lines %tmp%\_ubcd.dat
  @rem pause
    :_loop_j
      call var set _j=(%_j%+1)
      lmod /l%_j% /s; @set _app=[$4:$!][+]@set _appcmd=[$2][+]@set _apparc=[$1][+]@set _appmnu=[$3]<%tmp%\_ubcd.dat >%tmp%\~bin\_ubcd.bat
      call %tmp%\~bin\_ubcd.bat
      ren %tmp%\~bin\_ubcd.bat %_apparc%.bat
    @rem pause
    if "%_j%"=="%_n%" goto _end_j
    goto _loop_j
    :_end_j
     for %%i in (_j _n) do set %%i=
  if "%_i%"=="%_m%" goto _end_i
  goto _loop_i
:_end_i
for %%d in (%tmp%\~bin\*.bat) do echo @runapp.bat >>%%d
for %%i in (_i _m _cat) do set %%i=
set | xgrep -shy ^_app | lmod /l* /b= set [$1]=>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
:_movbat
xcopy %tmp%\~bin\*.bat %ramdrv%\bin /q /r /s /y /n >%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod [$1] program(s) found
deltree /y %tmp%\~bin >%tmp%\nul
goto _chkcmd
::
:_oldver
if exist %tmp%\_ubcd.bak del %_delq% %tmp%\_ubcd.bak
if "%appdir%"=="" if "%ver%"=="5" set appdir=%cddrv%\ubcd\dosapps
if "%appdir%"=="" if "%ver%"=="4" set appdir=%cddrv%\dosapps
echo %appdir% | lmod /s; set _dir1=[$1][+]set _dir2=[$2]>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
if "%_dir1%"=="%_dir2%" set _dir2=
set _i=0
set _lim=2
:_lp_dir
    call var set _i=(%_i%+1)
    echo _dir | lmod set _dir=[~37][]%_i%[~37]>%tmp%\_ubcd.bat
    call %tmp%\_ubcd.bat
    varset x=string %_dir% >%tmp%\nul
    if "%_dir%"=="" goto _skip_dir
    tfind /f1,%errorlevel% "%_dir%" %djdir%\index.dat>>%tmp%\_ubcd.bak
    @rem pause
  :_skip_dir
  if "%_i%"=="%_lim%" goto _end_dir
  goto _lp_dir
:_end_dir
@rem pause
for %%i in (_i _dir _lim) do set %%i=
for %%i in (2 1) do set _dir%%i=
call var set _x=lines %tmp%\_ubcd.bak
if "%_x%"=="0" el! 1
set  _x=
if errorlevel 1 goto _npath
mkdir %tmp%\~main
xgrep -shy startup[:p]?.bat$ %tmp%\_ubcd.bak >%tmp%\_ubcd.tmp
if errorlevel 1 goto _npath
for %%i in (4 5) do if "%ver%"=="%%i" goto _ver%%i
:_ver5
type %tmp%\_ubcd.tmp | lmod /s\ /l* copy [] %tmp%\~main\[$!-1].bat /Y [~62]%tmp%\nul >%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
if exist %ramdrv%\bin\attrib.com attrib +a -rhs %tmp%\~main\*.bat /s >%tmp%\nul
call %0 : _oldmenu APPNAME=
mkdir %ramdrv%\MAIN
xcopy %tmp%\~main\*.bat %ramdrv%\main /q /r /s /y /n >%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod [$1] program(s) found
deltree /y %tmp%\~main >%tmp%\nul
set path=%path%;%ramdrv%\main
goto _chkcmd
:_oldmenu
shift
shift
if exist %tmp%\_ubcd.* del %_delq% %tmp%\_ubcd.*
xgrep -shxy %1 %tmp%\~main\*.bat >%tmp%\_ubcd.tmp
lmod /l* /b= [$2]~%ramdrv%\main\<%tmp%\_ubcd.tmp >>%tmp%\_ubcd.bak
lmod /l* /b= [$2]<%tmp%\_ubcd.tmp >>%tmp%\_ubcd.tm$
mdir /o /b %tmp%\~main\*.bat | lmod /l* []>%tmp%\_ubcd.tmp
lmod /s. /l* [$1,l]<%tmp%\_ubcd.tmp >%tmp%\_ubcd.tm#
if not exist %ramdrv%\help\nul mkdir %ramdrv%\help
concat %tmp%\_ubcd.tm# %tmp%\_ubcd.tm$ /f9 >%ramdrv%\help\ubcd.hlp
concat %tmp%\_ubcd.bak %tmp%\_ubcd.tmp >%djdir%\ubcd.mnu
echo ubcd     Ultimate Boot CD>>%ramdrv%\help\ubcd.hlp
echo.>>%ramdrv%\help\ubcd.hlp
goto _eof
:_ver4
xgrep -shy startup[:p]?.bat$ %tmp%\_ubcd.bak >%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod /s\ /l* echo %cddrv% [~62]%tmp%\~main\[$!-1,l].bat >%tmp%\_ubcd.bat
xgrep -shxy "%cddrv%" <%tmp%\_ubcd.tmp | lmod /s\ /l* type [] [~62][~62]%tmp%\~main\[$!-1,l].bat >>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
if exist %ramdrv%\bin\attrib.com attrib +a -rhs %tmp%\~main\*.bat /s >%tmp%\nul
mdir /o /b %tmp%\~main\*.bat | lmod /s. /l* [$1]~%ramdrv%\main\[$1].bat >%djdir%\ubcd.mnu
if exist %tmp%\~main\vc.bat del %_delq% %tmp%\~main\vc.bat
mkdir %ramdrv%\MAIN
xcopy %tmp%\~main\*.bat %ramdrv%\main /q /r /s /y /n >%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod [$1] program(s) found
deltree /y %tmp%\~main >%tmp%\nul
set ubcddrv=%cddrv%
goto _chkcmd

:_npath
:: to be done...
::
:_nocd
echo UBCD: Warning! could not set version (cd-rom disabled)
goto _chkcmd

:_chkcmd
set ubcd_off=
if "%ubcdcmd%"=="" goto _runcmd
if exist %ramdrv%\main\%ubcdcmd%.bat goto _runcmd
if exist %ramdrv%\bin\%ubcdcmd%.bat goto _runcmd
echo UBCD: Error!!! missing %ubcdcmd%.bat (check CD)
echo.
set ubcdcmd=
@pause
:_runcmd
if "%1"==":" call %0 : _info
%ramdrv%
cd \
if not "%ubcdcmd%"=="" call %ubcdcmd%
set ubcdcmd=
if "%ubcd_off%"=="1" goto _ubcdend

:_ubcd
if "%w_but%"=="" set w_but=1
for %%i in (%tmp%\_ubcd.*) do if exist %%i del %_delq% %%i>%tmp%\nul
if "%ubcd_ti%"=="" set ubcd_ti=0
echo :w_msg "Ultimate Boot CD %ubcd_ver%" [x]>%tmp%\_ubcd.tmp
echo                      (~press any key~: #? sec.)>>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo [ Launch ]  CD applications >>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo [ System ]  Drivers/network/system tools >>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo [  Help  ]  List available commands >>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo [ Browse ]  File browser (lfn support) >>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo             If you experience a problem when >>%tmp%\_ubcd.tmp
echo             running a program, try enabling  >>%tmp%\_ubcd.tmp
echo             an alternate boot mode. >>%tmp%\_ubcd.tmp
echo.>>%tmp%\_ubcd.tmp
echo                           [ About ] [? Exit ] >>%tmp%\_ubcd.tmp
call w.bat box @%tmp%\_ubcd.tmp:w_msg #%w_but%,%ubcd_ti%
if errorlevel 100 goto _ubcdend
if errorlevel 6 goto _ubcdend
if errorlevel 5 goto _about
if errorlevel 4 goto _vc
if errorlevel 3 goto _cmd
if errorlevel 2 goto _nwdsk
if exist %djdir%\ubcd.mnu goto _dosold
goto _dos
:_ubcdend
echo UBCD: Type "ubcd" to return to main menu
echo.
goto _end

:_nwdsk
set w_but=2
if not exist %ramdrv%\bin\menu.bat %0 : _err missing menu.bat (check menu.%arcext%)
call menu.bat :
goto _ubcd
:_cmd
set w_but=3
if not exist %ramdrv%\bin\help.bat %0 : _err missing help.bat (check help.%arcext%)
call help.bat :
goto _ubcd
:_vc
set w_but=4
if not exist %ramdrv%\bin\vc.bat %0 : _err missing vc.bat (check vc.%arcext%)
if exist %ramdrv%\bin\lfn.bat if "%lfn%"=="N" call lfn -e
call %ramdrv%\bin\vc.bat
if "%ubcd_ver%"=="4.1.1" if "%lfn%"=="Y" call lfn -d
goto _ubcd
:_about
set w_but=5
if not exist %ramdrv%\bin\about.bat %0 : _err missing about.bat (check modboot.%arcext%)
call about.bat :
goto _ubcd
:_dos2
set w_but=1
if not "%cddrv%"=="" goto _dos3
echo UBCD: Aborted! Cd-rom support disabled (type "cdrom" to enable)
echo.
@pause
goto _ubcd

:_dos
set w_but=1
if not "%cddrv%"=="" goto _dosok
echo UBCD: Aborted! Cd-rom support disabled (type "cdrom" to enable)
echo.
@pause
goto _ubcd
:_dosok
%ramdrv%
:_loop_l
for %%i in (%tmp%\_ubcd.*) do del %_delq% %%i
echo :w_ubcd " CD Applications " [x]>%tmp%\_ubcd.bak
xgrep -sy ^[[][:a:d:s]*[]]$ %djdir%\programs.cfg | lmod /l* /s[] [$1:$!] >>%tmp%\_ubcd.bak
call w.bat list @%tmp%\_ubcd.bak:w_ubcd
if "%wbat%"=="" goto _ubcd
echo :w_ubcd " CD Applications - %wbat% " [x]>%tmp%\_ubcd.tmp
inifile %djdir%\programs.cfg [%wbat%] | lmod /l* /s; [$5:$!]>>%tmp%\_ubcd.tmp
:_loop_m
if "%ubcd_off%"=="1" goto _ubcdend
call w.bat list @%tmp%\_ubcd.tmp:w_ubcd
if "%wbat%"=="" goto _loop_l
type %djdir%\programs.cfg | tfind "%wbat%" | lmod /s; %ramdrv%\bin\[$1].bat | stow wbat >%tmp%\nul
if "%wbat%"=="" goto _ubcd
call %wbat%
goto _loop_m

:_dosold
set w_but=1
if not "%cddrv%"=="" goto _dosoldok
echo UBCD: Aborted! Cd-rom support disabled (type "cdrom" to enable)
echo.
@pause
goto _ubcd
:_dosoldok
%ramdrv%
:_loop_k
if "%ubcd_off%"=="1" goto _ubcdend
for %%i in (%tmp%\_ubcd.*) do del %_delq% %%i
echo :w_ubcd " Ultimate Boot CD %ubcd_ver% " [x]>%tmp%\_ubcd.bak
type %home%\ubcd.mnu>>%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod /L* /B~ echo [$1][~62][~62]%tmp%\_ubcd.bak>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
call w.bat list @%tmp%\_ubcd.bak:w_ubcd
if "%wbat%"=="" goto _ubcd
type %tmp%\_ubcd.tmp | tfind "%wbat%" | lmod /B~ set wbat=[$2] [$3]>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
if "%wbat%"=="" goto _ubcd
call %wbat%
set wbat=
goto _loop_k

:_warn
shift
shift
if errorlevel 255 goto _eof
echo UBCD: Warning! %1 %2 %3 %4 %5 %6 %7 %8
echo.
el! 255
goto _eof
:_err
shift
shift
echo UBCD: Error!!! %1 %2 %3 %4 %5 %6 %7 %8
echo.
goto _end
:_abort
shift
shift
echo UBCD: Aborted!
echo.
goto _end
:_end
set ?=
set | tfind /f1,2 "W_" >%tmp%\_ubcd.tmp
set | tfind /f1,5 "ubcd_" >>%tmp%\_ubcd.tmp
set | tfind /f1,5 "_ubcd" >>%tmp%\_ubcd.tmp
set | tfind /f1,5 "bcdw_" >>%tmp%\_ubcd.tmp
type %tmp%\_ubcd.tmp | lmod /L* /B= set [$1]=>%tmp%\_ubcd.bat
call %tmp%\_ubcd.bat
set wbat=
set wrb=
for %%i in (1 2 3 4 5 6 7 8 9) do set wcb%%i=
if exist %tmp%\_ubcd.* del %_delq% %tmp%\_ubcd.*
::
:_eof


RUNAPP.BAT
Code:
@if "%debug%"=="" echo off
if "%1"==":" if not "%2"=="" goto %2
::
for %%i in (varset.com var.bat stow.exe) do if not exist %ramdrv%\bin\%%i %0 : _err missing %%i (check utilz.%arcext%)
for %%i in (wbat.com tfind.com lmod.com) do if not exist %ramdrv%\bin\%%i %0 : _err missing %%i (check utils.%arcext%)
:_init
if "%cddrv%"=="" goto _abort
for %%i in (name code exe) do if "%app%%i%"=="" goto _initok
set _app=%appname%
set _appcmd=%appexe%
set _apparc=%appcode%
for %%i in (appname appcode appexe) do set %%i=
for %%i in (_app _appcmd _apparc) do if "%%%i%"=="" goto _end
:_initok
set _appdir=%_apparc%
if exist %djdir%\index.dat goto _initbin
mdir /s /b /o %cddrv%\ >%djdir%\index.dat
:_initbin
echo %_appcmd% | lmod [$1] | stow _appbin >%tmp%\nul
if "%_appbin%"=="callver" goto _getbin1
goto _start
:_getbin1
echo %_appcmd% | lmod [$3] | stow _appbin >%tmp%\nul
:_start
echo UBCD: Searching...
:_start2
if exist %tmp%\_runa.* del %_delq% %tmp%\_runa.*
set _$dest=%ramdrv%\usr\%_appdir%
if exist %_$dest%\%_appbin% goto _unpok2
if "%appdir%"=="" goto _scan
echo %appdir% | lmod /s; @set _appsrc1=[$1][+]@set _appsrc2=[$2]>%tmp%\_runa.bat
call %tmp%\_runa.bat
:_scan
for %%f in (cab zip uha rar 7z) do call %0 : _getarc %%f
if "%_$arcext%"=="" goto _getdir
for %%f in (cab zip uha rar 7z) do xgrep -shy [:p].?%%f$ %tmp%\_runa.bak >>%tmp%\_runa.tmp
call var set _$dupl=lines %tmp%\_runa.tmp
if "%_$dupl%"=="0" goto _auto
if "%_$dupl%"=="1" goto _getarcok
goto _duplex
:_getarcok
set _$dupl=
lmod []<%tmp%\_runa.tmp | stow _$archive >%tmp%\nul
call %0 : _getpath %_$archive%
call %0 : _app%_$arcext% %_$archive% %_appbin%
if errorlevel 1 goto _getdir
goto _arcok
:_getarc
shift
shift
set _$lim=2
if "%_appsrc1%"=="%_appsrc2%" set _$lim=1
set _i=0
:_lp_src
    call var set _i=(%_i%+1)
    if "%appdir%"=="" goto _auto_src
    echo _appsrc | lmod set _$src=[~37][]%_i%[~37]>%tmp%\_runa.bat
    call %tmp%\_runa.bat
    xgrep -shy ^%_$src%\%_apparc%.%1$ %djdir%\index.dat >>%tmp%\_runa.bak
  if errorlevel 1 goto _nxt_src
  set _$arcext=%1
  goto _nxt_src
  :_auto_src
    xgrep -shy [:a:d]?%_apparc%[:p].?%1$ %djdir%\index.dat >>%tmp%\_runa.bak
  if errorlevel 1 goto _end_src
  set _$arcext=%1
  goto _end_src
  :_nxt_src
  if "%_i%"=="%_$lim%" goto _end_src
  goto _lp_src
:_end_src
for %%i in (lim src) do set _$%%i=
set _i=
goto _eof
:_duplex
set _i=0
:_lp_dup
    call var set _i=(%_i%+1)
    lmod /l%_i% /s. set _$arcext=[$2,l][+]set _$archive=[]<%tmp%\_runa.tmp >%tmp%\_runa.bat
    call %tmp%\_runa.bat
    call %0 : _app%_$arcext% %_$archive% %_appbin%
  if errorlevel 1 goto _nxt_dup
  goto _end_dup
  :_nxt_dup
  el! 255
  if "%_i%"=="%_$dupl%" goto _end_dup
  goto _lp_dup
:_end_dup
set _$dupl=
set _i=
if errorlevel 255 goto _getdir
echo UBCD: Found! Installing %_app%
goto _enufdisc
:_getdir
xgrep -shy \\%_appdir%[:a:d:p]*%_appbin%$ %djdir%\index.dat >%tmp%\_runa.bak
if errorlevel 1 goto _apperr
lmod /l1 []<%tmp%\_runa.bak | stow _$src >%tmp%\nul
call %0 : _getpath %_$src%
goto _runcd
:_apperr
if "%appdir%"=="" %0 : _err missing archive/directory (%_appdir%.?)
echo %appdir% >%tmp%\_appdir.set
set | tfind /f1,2 "_$" >%tmp%\_runa.tmp
set | tfind /f1,6 "appdir" >%tmp%\_runa.tmp
type %tmp%\_runa.tmp | lmod /L* /B= set [$1]=>%tmp%\_runa.bat
call %tmp%\_runa.bat
if exist %tmp%\_runa.* del %_delq% %tmp%\_runa.*
goto _start2
:_getpath
shift
shift
varset x=string %1 >%tmp%\nul
set _$char=%_$char%~%errorlevel%
call var set n=ext %1
varset x=string %n% >%tmp%\nul
set _$char=%_$char%~%errorlevel%
echo %1 | lmod /s.\ [$!-1] | stow n >%tmp%\nul
varset x=string %n% >%tmp%\nul
set _$char=%_$char%~%errorlevel%
echo %_$char% | lmod /s~ call var set n=([$1]-([$2]+[$3]+2)[+]set _$char=>%tmp%\_runa.bat
call %tmp%\_runa.bat
echo %1 | lmod [1,%n%] | stow _$src >%tmp%\nul
set n=
goto _eof
::
:_arcok
echo UBCD: Found! Installing %_app%
echo %_appbin% | lmod [l] | stow _appbin >%tmp%\nul
for %%d in (_apparc _appdir) do echo %%%d% | lmod /l* [l] | stow %%d >%tmp%\nul
for %%d in (cab zip uha rar 7z) do if "%_$arcext%"=="%%d" call %0 : _app%%d %_$archive% %_appbin%
if errorlevel 1 %0 : _err missing %_appbin% (check %_apparc%.%_$arcext%)
goto _enufdisc
:_appcab
shift
shift
if not exist %ramdrv%\bin\extract.exe %0 : _err missing extract.exe (check %srcdrv%\bin)
extract.exe %1 /D | lmod /l* [l] >%tmp%\_runa.tm$
tfind /f1 "%2" <%tmp%\_runa.tm$ >%tmp%\nul
if errorlevel 1 goto _eof
tfind /f1 " bytes" <%tmp%\_runa.tm$ | lmod /s /l* [$!-1] >%tmp%\_runa.tm$
lmod /s, /l* [$1][$2][$3][$4][$5][$6][$7][$8]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
goto _eof
:_appzip
shift
shift
:: if not exist %ramdrv%\bin\unzip.exe %0 : _err missing unzip.exe (check %srcdrv%\bin)
:: unzip.exe -l %1 | lmod /l* [l] >%tmp%\_runa.tm$
if not exist %ramdrv%\bin\pkunzip.exe %0 : _err missing pkunzip.exe (check %srcdrv%\bin)
pkunzip.exe -v %1 | lmod /l* [l] >%tmp%\_runa.tm$
tfind /f1 "%2" <%tmp%\_runa.tm$ >%tmp%\nul
if errorlevel 1 goto _eof
call var set _n=lines %tmp%\_runa.tm$
:: lmod /l%_n% [$1]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
lmod /l%_n% [$2]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
set _n=
goto _eof
:_appuha
shift
shift
if not exist %ramdrv%\bin\uharcd.exe %0 : _err missing uharcd.exe (check %srcdrv%\bin)
uharcd.exe l -y+ -o+ %1 >%tmp%\_runa.tm$
tfind /f1 "%2" <%tmp%\_runa.tm$ >%tmp%\nul
if errorlevel 1 goto _eof
call var set _n=lines %tmp%\_runa.tm$
call var set _n=(%_n%-1)
for %%e in (255 1) do if errorlevel %%e %0 : _err arithmetic (uha)
lmod /l%_n% [$!]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
set _n=
goto _eof
:_apprar
shift
shift
if not exist %ramdrv%\bin\unrar.exe %0 : _err missing unrar.exe (check %srcdrv%\bin)
unrar.exe vt %1 >%tmp%\_runa.tm$
tfind /f1 "%2" <%tmp%\_runa.tm$ >%tmp%\nul
if errorlevel 1 goto _eof
call var set _n=lines %tmp%\_runa.tm$
call var set _n=(%_n%-1)
for %%e in (255 1) do if errorlevel %%e %0 : _err arithmetic (uha)
lmod /l%_n% [$2]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
set _n=
goto _eof
:_app7z
shift
shift
if not exist %ramdrv%\bin\7za.exe %0 : _err missing 7za.exe (check %srcdrv%\bin)
7za.exe l %1 >%tmp%\_runa.tm$
tfind /f1 "%2" <%tmp%\_runa.tm$ >%tmp%\nul
if errorlevel 1 goto _eof
call var set _n=lines %tmp%\_runa.tm$
lmod /l%_n% [$1]<%tmp%\_runa.tm$ | stow _appsz >%tmp%\nul
set _n=
goto _eof
::
:_enufdisc
call var set _appsz=(%_appsz%/1024)
call var set _appszt=(3072+%_appsz%)
dir %ramdrv% | tfind " bytes free" >%tmp%\_runa.bak
lmod /s /l* [$!-2]<%tmp%\_runa.bak >%tmp%\_runa.tmp
lmod /s, /l* [$1][$2][$3][$4][$5][$6][$7][$8]<%tmp%\_runa.tmp | stow _appenuf >%tmp%\nul
call var set _appenuf=(%_appenuf%/1024)
call var set _appdiff=(%_appenuf%-%_appszt%)
if errorlevel 255 %0 : _abort
if errorlevel 1 goto _noenuf
:_unpack
echo %_appdir% | lmod [u] | stow _appdir >%tmp%\nul
if not exist %ramdrv%\usr\nul mkdir %ramdrv%\usr
if not exist %ramdrv%\usr\%_appdir%\nul mkdir %ramdrv%\usr\%_appdir%
for %%d in (_apparc _appdir) do call var set %%d=string %%%d% /u
echo UNPACK: Extracting "%_$archive%"
for %%d in (cab zip uha rar 7z) do if "%_$arcext%"=="%%d" goto _un%%d
:_uncab
extract.exe /Y /E /L %_$dest% %_$archive% >%tmp%\extract.out
goto _unpok
:_unzip
pkunzip.exe -o -d %_$archive% %_$dest% >%tmp%\extract.out
goto _unpok
:_unzip2
unzip.exe -o -C -qq %_$archive% -d %_$dest% >%tmp%\extract.out
goto _unpok
:_unuha
uharcd.exe x -y+ -o+ -t%_$dest% %_$archive% >%tmp%\extract.out
goto _unpok
:_unrar
unrar.exe x -c- -o+ -y %_$archive% %_$dest% >%tmp%\extract.out
goto _unpok
:_un7z
7za.exe x -bd -o%_$dest% %_$archive% >%tmp%\extract.out
:_unpok
if errorlevel 1 %0 : _err
if exist %ramdrv%\bin\attrib.com attrib +r -hsa %ramdrv%\usr\%_appdir%\*.* /s >%tmp%\nul
:_unpok2
%ramdrv%
dir /s /b /o %ramdrv%\usr\%_appdir% >%tmp%\_runa.bak
xgrep -shy %_appdir%[:a:d:p]*%_appbin%$ %tmp%\_runa.bak >%tmp%\_runa.tmp
lmod /l1 []<%tmp%\_runa.tmp | stow _$src >%tmp%\nul
call %0 : _getpath %_$src%
goto _run
:_runcd
%cddrv%
:_run
cd \
cd %_$src%
set | tfind /f1,2 "_$" >%tmp%\_runa.tmp
for %%i in (_appdir _appsz _appsrc _appbin _apparc _appenuf _appdiff) do call %0 : _preclr %%i
type %tmp%\_runa.tmp | lmod /L* /B= set [$1]=>%tmp%\_runa.bat
echo set _app=>>%tmp%\_runa.bat
call %tmp%\_runa.bat
if exist %tmp%\_runa.* del %_delq% %tmp%\_runa.*
if exist autorun.bat goto _runauto
call %_appcmd%
goto _endapp
:_runauto
call autorun.bat
:_endapp
if "%_appmnu%"=="-" goto _end
if "%_appmnu%"=="-p" pause
if "%_appmnu%"=="-o" set ubcd_off=1
goto _end
::
:_noenuf
if "%_appclr%"=="1" %0 : _err Ramdisk full (try increasing size of ramdisk)
echo :w_config "Ramdisk is full" [x]>%tmp%\_runa.tmp
echo        (~press any key~: #? sec.)>>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo !! Warning !! >>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo There is not enough free space >>%tmp%\_runa.tmp
echo to extract "%_apparc%.%_$arcext%" >>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo [$ _appsz,9] Kb required >>%tmp%\_runa.tmp
echo [$ _appszt,9] Kb required (total) >>%tmp%\_runa.tmp
echo [$ _appenuf,9 ] Kb available (%ramdrv%\) >>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo Delete previous installation(s)>>%tmp%\_runa.tmp
echo to free up available memory?>>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo.>>%tmp%\_runa.tmp
echo        [ Ok ] [? Cancel ] >>%tmp%\_runa.tmp
call w.bat box @%tmp%\_runa.tmp:w_config #4,30
if errorlevel 2 %0 : _err Ramdisk full (not enough free space)
echo UBCD: Deleting contents "%ramdrv%\usr\.."
%ramdrv%
cd \
set _appclr=1
dir /b %ramdrv%\usr | tfind /v /f1,2 "VC" | lmod /s /l* deltree /y %ramdrv%\usr\[$1][~62]%tmp%\nul>%tmp%\_runa.bat
call %tmp%\_runa.bat
goto _enufdisc
::
:_err
shift
shift
if not exist %tmp%\extract.out goto _err2
type %tmp%\extract.out
@pause
goto _end
echo UNPACK: Error while unpacking "%_apparc%.%_$arcext%"
:_err2
echo UBCD: Error!!! %1 %2 %3 %4 %5 %6 %7 %8
echo.
@pause
goto _end
:_abort
shift
shift
echo UBCD: Aborted
:_preclr
shift
shift
varset x=string %1 >%tmp%\nul
set | tfind /f1,%errorlevel% "%1">>%tmp%\_runa.tmp
goto _eof
:_end
set ?=
if not exist %tmp%\_appdir.set goto _end2
lmod []<%tmp%\_appdir.set | stow appdir >%tmp%\nul
:_end2
set | tfind /f1,2 "W_" >%tmp%\_runa.tmp
set | tfind /f1,2 "_$" >>%tmp%\_runa.tmp
set | tfind /f1,5 "_app" >>%tmp%\_runa.tmp
type %tmp%\_runa.tmp | lmod /L* /B= set [$1]=>%tmp%\_runa.bat
call %tmp%\_runa.bat
set wbat=
set wrb=
for %%i in (1 2 3 4 5 6 7 8 9) do set wcb%%i=
for %%i in (%tmp%\_runa.* %tmp%\extract.out) do if exist %%i del %_delq% %%i
::
:_eof

"So, what else is new?"
Namely, this
viewtopic.php?t=1422&start=29

The feature is available (UBCD4.11 and UBCD 5) but not activated by default (Victor is working on formalising the format for the next UBCD release). If you intend to use, it, simply populate the INI file with the dosapp programs in question and place it anywhere in the ISO.

There's other aspects that have been significantly improved but I'd like to finish this release before outlining their function.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 26, 2008 7:42 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
R1.31 is up.


Top
 Profile  
 
 Post subject: Not Working
PostPosted: Wed Aug 27, 2008 4:02 am 
Offline

Joined: Sat Mar 22, 2008 6:04 am
Posts: 48
Not working for me. :cry:
It stops at Q:\>


Top
 Profile  
 
 Post subject: Re: Not Working
PostPosted: Wed Aug 27, 2008 4:27 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
R1.32 is up

Quote:
fixed serious bug for UBCD 4.1.1 (forgot to set valid path to "dosapps" /main folder)
adjusted ramdrive (volume label now assigned)
replaced SHSURDRV to 1.11a (no-GZIP + ~10Kb smaller)
replaced stow.exe with nset.exe (~3Kb smaller + more features)
replaced choice.exe with choix.exe (~4Kb smaller)


There's always something. (-:

grayfox wrote:
Not working for me. :cry:
It stops at Q:\>

Try the update. It should fix the problem. What version of UBCD are you using?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 28, 2008 7:32 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
More musings...

Since R1.32 now supports fully customisable paths for "dosapps" (either via NwDsk or an *.INI file), I added a few lines to ubcd.bat to dynamically locate the dosapps folder if any of these paths aren't found.

Code:
:_fpath
echo ЪДДДДДДДДДДДДДДДДДДДДДї
echo і Scanning media...   і
echo АДДДДДДДДДДДДДДДДДДДДДЩ
::
xgrep -shy startup[:p]?.bat$ %djdir%\index.dat >%tmp%\_ubcd.bak
xgrep -syrl ^s?e?t?[:s]*a?p?p?c?o?d?e[:p]?= %cddrv%\*.bat >%tmp%\_ubcd.tmp
call var set _x=lines %tmp%\_ubcd.tmp
call var set _y=lines %tmp%\_ubcd.bak
if not "%_x%"=="0" goto _ver5
if "%_y%"=="0" goto _npath
type %tmp%\_ubcd.bak >%tmp%\_ubcd.tmp
goto _ver4


Image

This works for existing versions of UBCD 4/5. It's probably overkill but I thought it might make a nice addition for the next release(?).


Top
 Profile  
 
 Post subject: Ext2/Ext3/NTFS support
PostPosted: Tue Sep 16, 2008 9:06 am 
Offline

Joined: Tue Jun 17, 2008 3:14 am
Posts: 276
Just an update...

The next release should be following shortly (alongside native MS-DOS support). I've also been experimenting with an Ext2/Ext3/NTFS driver by Paragon (IFS for DOS). Below are some of the results...

Image
Memory usage statistics of IFS driver (requires HX DOS-Extender)

Image
Ext3 file system support (Ubuntu volume)

Image
NTFS support (Vista volume)

LongFileName support is included (doesn't require DOSLFN) and the memory footprint is tiny (~40Kb in total). It works natively in MS-DOS environments (6.22 and 7.10) but requires 4DOS in order to use with FreeDOS (FreeCOM doesn't seem to agree with it when running DIR commands). I haven't had a chance to test it with (E)DR-DOS yet.

_________________
"If you think things can't get any worse it's probably because you lack sufficient imagination."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 64 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group