home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hot Shareware 32
/
hot34.iso
/
ficheros
/
OUTI
/
DISKCT17.ZIP
/
INSTALL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1996-10-16
|
3KB
|
106 lines
/* install DiskCat */
call RxFuncAdd "SysLoadFuncs","RexxUtil","SysLoadFuncs"
call SysLoadFuncs
call SysCls
say
say "DiskCat install utility"
say
say
say "please enter target drive/path :"
say "(default C:\DiskCat)"
pos = SysCurPos(4,34)
pull drive
pos = SysCurPos(7,0)
map = SysDriveMap("A:")
targetdrive = "C:\DiskCat\"
dp = ":"
bs = "\"
if substr(drive,1,1) = ""
then target = targetdrive
else target = drive
if substr(target,2,1) = ""
then target = insert(dp,target,1)
if substr(target,3,1) = ""
then target = insert(bs,target,2)
if wordpos(substr(target,1,2),map) = 0
then do
say "drive does not exist!"
exit
end
if substr(target,length(target),1) = bs
then target = delstr(target,length(target),1)
if length(target) > 3 then do
rc = SysFileTree(target,"result","D")
dirfound = 0
if result.0 = 0 then do
say "directory does not exist, create ? y/n :"
pos = SysCurPos(7,45)
pull answer
if answer = "Y" then do
rc = SysMkDir(target)
if rc > 0 then do
say "could not create target directory !!!"
exit
end
else do
rc = SysFileTree(target,"result","D")
if result.0 > 0 then
dirfound = 1
end
end
end
else
dirfound = 1
end
if dirfound = 1 then do
"@copy diskcat.exe >NUL" target
"@copy diskcat.inf >NUL" target
"@copy diskcat.ico >NUL" target
"@copy diskcat.msg >NUL" target
"@copy file_id.diz >NUL" target
"@copy bmtmicro.reg >NUL" target
rc = SysCreateObject("WPFolder", ,
"Disk Catalog", ,
"<WP_DESKTOP>", ,
"OBJECTID=<DSK_CAT>")
rc = SysSetObjectData('<DSK_CAT>', 'ICONFILE='||target||'\diskcat.ico;')
rc = SysSetObjectData('<DSK_CAT>', 'OPEN=DEFAULT;')
rc = SysFileDelete(target||'\diskcat.ico')
options = "EXENAME=" || target || "\DiskCat.EXE;" || "STARTUPDIR=" || target || ";"
rc = SysCreateObject('WPProgram','Disk Catalog','<DSK_CAT>',options,'REPLACE');
options = "EXENAME=VIEW.EXE;PARAMETERS=" || target || "\diskcat.inf;"
rc = SysCreateObject('WPProgram','Handbook','<DSK_CAT>',options,'REPLACE');
options = "SHADOWID=" || target || "\bmtmicro.reg;OBJECTID=<DSK_CAT_REG>"
rc = SysCreateObject('WPShadow','Registration^Form','<DSK_CAT>',options,'REPLACE');
drive = substr(target,1,2)
drive
"@cd "target
"start diskcat.exe "
end
call SysDropFuncs
exit