Metropoli BBS
VIEWER: uninstal.bat MODE: TEXT (ASCII)
@echo off
echo off

if exist c:\mhz\uninstal.tmp goto _directory

cls
echo                       WINDOWS 3.1x UNINSTALL
echo.
echo This batch file will restore your system to the way it was before
echo SETUP was run.  It does this by copying the backup files created
echo during the installation back over the new files.  Any files copied
echo to your hard disk will also be deleted if you installed to the
echo default directory (C:\MHZ).
echo.
echo (This program will not restore the Microsoft Windows files if Windows
echo is not installed in the C:\WINDOWS directory.)
echo.
echo WARNING:
echo      If you have made any changes to your system files, or have run any
echo other installation programs since the SETUP program was last run,
echo running this batch file could cause problems on your system. 
echo.
echo Press CTRL-C or CTRL-BREAK to abort UNINSTALL,
echo or press any other key to continue.
pause > nul:

echo.
echo.

if not exist c:\config.m00 goto _error
if not exist c:\autoexec.m00 goto _error

echo Restoring CONFIG.SYS ...
del c:\config.sys
ren c:\config.m00 config.sys

echo Restoring AUTOEXEC.BAT ...
del c:\autoexec.bat
ren c:\autoexec.m00 autoexec.bat

echo Deleting extra backup files ...
del c:\config.m0?
del c:\config.m1?
del c:\autoexec.m0?
del c:\autoexec.m1?

if not exist c:\windows\system.m00 goto _system
echo Restoring WINDOWS\SYSTEM.INI ...
del c:\windows\system.ini
ren c:\windows\system.m00 system.ini

echo Deleting extra Windows backup files ...
del c:\windows\system.m0?
del c:\windows\system.m1?

if not exist c:\windows\win.m00 goto _system
echo Restoring WINDOWS\WIN.INI ...
del c:\windows\win.ini
ren c:\windows\win.m00 win.ini

echo Deleting extra Windows backup files ...
del c:\windows\win.m0?
del c:\windows\win.m1?

:_system

if not exist c:\mhz\uninstal.bat goto _finished
copy c:\mhz\uninstal.bat c:\ > NUL:
echo XXX > c:\mhz\uninstal.tmp
c:\uninstal.bat
goto _finished

:_directory

if not exist c:\uninstal.bat goto _finished
echo Deleting the MHZ directory ...
c:
cd \mhz
echo y | del *.* > NUL:
cd \
rd \mhz

goto _dir_finished

:_error

echo ERROR:  Backup files cannot be found to restore the system with.
echo.
echo The program SETUP has not been run completely, or the backup files
echo created when SETUP was run have been deleted.
echo In either case, the system cannot be restored.
echo.

goto _end

:_finished

echo.
echo The computer has been restored to the configuration it had before
echo SETUP was run.  However, these changes will not be implemented
echo until you reboot the computer.  (The files copied during the
echo installation have not been deleted.)
echo.

goto _end

:_dir_finished

echo.
echo The computer has been restored to the configuration it had before
echo SETUP was run.  However, these changes will not be implemented
echo until you reboot the computer.
echo.
echo You may get an error message when this batch file exits.
echo This error message is expected, and should be ignored.
echo.

del c:\uninstal.bat > nul:

:_end
[ RETURN TO DIRECTORY ]