home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
haotd1_2.zip
/
UNINST.CMD
< prev
Wrap
OS/2 REXX Batch file
|
1995-10-12
|
2KB
|
93 lines
/* Uninst.cmd */
/* $Revision: 1.1 $ */
/* $Date: 1995/10/10 08:58:36 $ */
PARSE ARG arg1
/* Load RexxUtil functions */
call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
call SysLoadFuncs
/* Clear screen */
rv = SysCls()
/*Check for setup.cmd */
rc = SysFileTree("uninst.cmd", 'stem', 'O')
IF stem.0 = 0 THEN
SIGNAL err
AppPath = DIRECTORY()
Confirm:
say ' '
say ' '
say 'Are you sure you want to UNINSTALL HyperACCESS Test Drive? [y/n]'
key = SysGetKey()
IF key = 'y' && key = 'Y' THEN
SIGNAL Delete
ELSE
DO
IF key = 'n' && key = 'N' THEN
DO
say ' '
say ' '
say 'Uninstall Aborted!'
SIGNAL Cleanup
END
ELSE
SIGNAL Confirm
END
Delete:
say ' '
say ' '
say 'Deleting HyperACCESS files...'
say ' '
szFileSpec = AppPath'\*.*'
rv = SysFileTree(szFileSpec, 'stem', 'O')
DO i = 1 to stem.0
rv = SysFileDelete(stem.i)
IF rv <> 0 THEN
say 'ERROR: ' stem.i 'not deleted.'
END
RemoveObj:
say 'Removing desktop objects...'
say ' '
rv = SysDestroyObject('<HAOS2>')
IF rv <> 1 THEN
say 'ERROR: HyperACCESS folder not removed!'
ELSE
DO
say 'HyperACCESS folder removed.'
say ' '
END
say 'Uninstall completed!'
SIGNAL Cleanup
Err:
/* if not in installation directory */
rc = SysCls()
say ' '
say ' '
say ' '
say ' '
SAY 'Please log onto the drive/directory that contains the HyperACCESS'
say 'program files and type UNINST'
SAY ' '
SIGNAL Cleanup
Cleanup:
/* Drop RexxUtil functions */
call SysDropFuncs
EXIT