home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 February
/
PCWK0297.iso
/
envelop
/
envelop.1
/
evuninst.bat
< prev
next >
Wrap
DOS Batch File
|
1996-07-08
|
2KB
|
80 lines
@echo off
if "%1" == "" goto USAGE
if "%2" == "" goto USAGE
if "%1" == "/?" goto USAGE
if not exist %1\nul goto NO_ENVELOP_PATH
if not exist %2 goto NO_UNINSTALLER
if exist %2\nul goto IS_DIRECTORY
rem Change any RO EBO files in the PROGRAM directory RW before uninstalling.
if not exist %1\PROGRAM\nul goto UNINSTALL
cd %1\PROGRAM
if exist base.ebo attrib -r base.ebo
if exist database.ebo attrib -r database.ebo
if exist dbtools.ebo attrib -r dbtools.ebo
if exist dialogs.ebo attrib -r dialogs.ebo
if exist envelop.ebo attrib -r envelop.ebo
if exist evhelp.ebo attrib -r evhelp.ebo
if exist win32.ebo attrib -r win32.ebo
rem Un-hide any GID files from HELP dir or samples.
cd %1
attrib -h *.gid /s
:UNINSTALL
cd \
rem Run InstallSHIELD uninstaller (with up to 7 args).
%2 %3 %4 %5 %6 %7 %8 %9
rem In case user cancelled uninstall, change back to RO the EBO files
rem in the PROGRAM directory if they exist still.
if not exist %1\PROGRAM\nul goto UNHIDE_GIDS
cd %1\PROGRAM
if exist base.ebo attrib +r base.ebo
if exist database.ebo attrib +r database.ebo
if exist dbtools.ebo attrib +r dbtools.ebo
if exist dialogs.ebo attrib +r dialogs.ebo
if exist envelop.ebo attrib +r envelop.ebo
if exist evhelp.ebo attrib +r evhelp.ebo
if exist win32.ebo attrib +r win32.ebo
:UNHIDE_GIDS
rem Similarly, if user cancelled uninstall, then
rem re-hide any GID files from HELP dir or samples.
if not exist %1\nul goto DONE
cd %1
attrib +h *.gid /s
goto DONE
:NO_ENVELOP_PATH
echo Error: Envelop installation path "%1" does not exist!
goto DONE
:NO_UNINSTALLER
echo Error: Uninstall program "%2" not found!
goto DONE
:IS_DIRECTORY
echo Error: "%2" is a directory, include the name of the uninstall program too.
goto DONE
:USAGE
echo Envelop Corps. interface to the InstallSHIELD Uninstaller program UNINST.EXE
echo.
echo EVUNINST path uninstaller [uninstaller-args]
echo.
echo path = Envelop installation path.
echo uninstaller = Full path name of uninstall program.
echo uninstaller-args = Command line arguments to uninstall program.
echo.
:DONE