home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 28 Fixes4x
/
28-Fixes4x.zip
/
chkdsk.zip
/
install.cmd
< prev
next >
Wrap
OS/2 REXX Batch file
|
1997-05-02
|
5KB
|
142 lines
/*-------------------------------------------------------------------------*
* INSTALL exec, started 2/07/97 by John Stiles, stiles@ausnotes
* --> Install this thing...
* Change Activity:
*-------------------------------------------------------------------------*
*/
os2_dir = '\os2'
os2_dll_dir = '\os2\dll'
os2_boot_dir = '\os2\boot'
file_1 = 'chkdsk32.exe'
file_2 = 'chkdsk32.dll'
file_3 = 'uhpfs.dll'
save_file_3 = 'uhpfs.sav'
file_4 = 'chkdsk.sys'
/* Load REXXUTIL */
call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
call sysloadfuncs
/* Find out where INSTALL.CMD is located */
Parse UPPER Source . . inst_fsp '\INSTALL.CMD'
/* Look for the boot drive */
bootdrive = filespec('Drive', value('comspec',, 'os2environment'))
'@echo off '
'type 'inst_fsp||'\readme | more.com '
say ' '
say ' '
say 'ChkDsk Service Fix install... '
say ' '
say 'The install program will install to your 'os2_dir' and 'os2_dll_dir' subdirectories. '
say ' '
say 'Three files will be copied to your system. Two are new, and one is a '
say ' replacement ('file_3'). The original 'file_3' will be copied to '
say ' 'save_file_3' in case you wish to restore the original function or '
say ' selectively run the Service Fix per instructions in the README. '
say ' '
say ' '
say 'Press Y to continue install - any other response quits: '
Parse UPPER value SysGetKey('NOECHO') with key
If key \= 'Y' Then do
say ' '
say 'Install ended at your request. '
Signal Quit_Pgm
End
/* Let them select a drive... */
say ' '
say 'Code will be installed on your 'bootdrive' drive. Press enter to accept, else '
say ' type the letter of the drive you wish to install on: '
Parse UPPER value SysGetKey('NOECHO') with key
If key = '0D'x Then sinkdrive = bootdrive
Else do
If (length(key) \= 1 | Datatype(key, 'U') \= 1) Then do
say ' '
say key' is not a valid OS/2 drive letter. '
say 'Install failed due to bad drive letter. '
Signal Quit_Pgm
End
sinkdrive = key||':'
say ' '
say ' Installing to drive 'sinkdrive
End
/* Look for directories... */
os2_fsp = sinkdrive||os2_dir
os2_dll_fsp = sinkdrive||os2_dll_dir
os2_boot_fsp = sinkdrive||os2_boot_dir
here = stream(os2_fsp||'\chkdsk.com', 'C', 'query exists')
If here = '' Then do
say ' '
say "Can't seem to find your "os2_fsp" directory. "
say 'This directory must be present for install to work properly. '
say 'Install failed due to missing subdirectory. '
Signal Quit_Pgm
End
here = stream(os2_dll_fsp||'\'||file_3, 'C', 'query exists')
If here = '' Then do
say ' '
say "Can't seem to find your "os2_dll_dir" directory. "
say 'This directory must be present for install to work properly. '
say 'Install failed due to missing subdirectory. '
Signal Quit_Pgm
End
here = stream(os2_boot_fsp||'\ibmkbd.sys', 'C', 'query exists')
If here = '' Then do
say ' '
say "Can't seem to find your "os2_boot_dir" directory. "
say 'This directory must be present for install to work properly. '
say 'Install failed due to missing subdirectory. '
Signal Quit_Pgm
End
/* Check for disk space... */
drinfo = SysDriveInfo(sinkdrive)
If drinfo = '' Then do
say ' '
say "Can't seem to find your "sinkdrive" drive. "
say 'Install failed due to missing drive. '
Signal Quit_Pgm
End
Parse var drinfo . drfree . .
drneed = 770000
If drfree < drneed Then do
say ' '
say 'Drive 'sinkdrive' has 'drfree' bytes free, install needs 'drneed' bytes.'
say 'Install failed due to insufficient space on drive 'sinkdrive
Signal Quit_Pgm
End
/* Copy the files... */
here = stream(os2_dll_fsp||'\'||save_file_3, 'C', 'query exists')
If here \= '' Then do
say ' '
say os2_dll_fsp||'\'||save_file_3' already exists. Install copies 'os2_dll_fsp||'\'||file_3
say ' to 'save_file_3' , so this file will be replaced by the existing 'file_3' . '
say ' Is this ok? Responses are: Y (yes) or N (no) - any other response quits: '
Parse UPPER value SysGetKey('NOECHO') with key
If key \= 'Y' & key \= 'N' Then do
say ' '
say 'Install ended at your request. '
Signal Quit_Pgm
End
Else If key = 'N' Then say 'Kept existing 'save_file_3' at your request.'
End
If here = '' | key = 'Y' Then
'copy 'os2_dll_fsp||'\'||file_3 os2_dll_fsp||'\'||save_file_3
'copy 'inst_fsp||'\'||file_1 os2_fsp||'\'||file_1
'copy 'inst_fsp||'\'||file_2 os2_dll_fsp||'\'||file_2
'copy 'inst_fsp||'\'||file_3 os2_dll_fsp||'\'||file_3
'copy 'inst_fsp||'\'||file_4 os2_boot_fsp||'\'||file_4
say ' '
say 'Install completed successfully. '
Quit_Pgm:
call SysDropFuncs
Exit 0