home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of Windows 95.com 1996 December
/
WIN95_DEC_1996_4.ISO
/
patches
/
nu95ptch.exe
/
NU95.EXE
/
UPDATE.BAT
< prev
Wrap
DOS Batch File
|
1996-02-01
|
4KB
|
103 lines
@echo off
if not x%windir%x==xx GOTO NODOSBOX
if not x%NU95DIR%x==xx GOTO NUFOUND
set NU95DIR=\PROGRA~1\NORTON~1
if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
set NU95DIR=\PROGRA~1\NORTON~2
if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
set NU95DIR=\PROGRA~1\NORTON~3
if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
set NU95DIR=\PROGRA~1\NORTON~4
:NUFOUND
if not exist %1%NU95DIR%\SIWNU.DLL goto NOPROGDIR
if not x%SYMDIR%x==xx GOTO SYMFOUND
set SYMDIR=\progra~1\symantec
:SYMFOUND
if not exist %SHARED%%SYMDIR%\NPROTECT.VXD goto NOSYMDIR
if not exist %1\nu95upd\backup\nul md %1\nu95upd\backup
if exist %1\nu95upd\backup\UNPATCH.BAT del %1\nu95upd\backup\UNPATCH.BAT >NUL
if exist %1\nu95upd\backup\TEMP.BAT del %1\nu95upd\backup\TEMP.BAT >NUL
if exist %1\nu95upd\backup\TEMP1.BAT del %1\nu95upd\backup\TEMP1.BAK >NUL
if exist %1\nu95upd\backup\TEMP2.TXT del %1\nu95upd\backup\TEMP2.TXT >NUL
if exist %1\nu95upd\backup\UNPATCH.BAK del %1\nu95upd\backup\UNPATCH.BAK >NUL
echo This may take awhile. Please be patient.
echo Patching Norton Utilities program files...
patch /Q /S /B:%1\nu95upd\backup %1%NU95DIR% nu95ptch
if ERRORLEVEL != 0 goto PATCHERR
rename %1\nu95upd\backup\UNPATCH.BAK TEMP1.BAT >NUL
echo Patching Symantec shared directory files...
patch /Q /NOS /B:%1\nu95upd\backup %SHARED%%SYMDIR% symptch
if ERRORLEVEL != 0 goto PATCHERR
copy %1\nu95upd\backup\UNPATCH.BAK+%1\nu95upd\backup\TEMP1.BAT %1\nu95upd\backup\TEMP.BAT >NUL
echo @echo off > %1\nu95upd\backup\TEMP2.TXT
echo if not x%%windir%%x==xx GOTO NODOSBOX >> %1\nu95upd\backup\TEMP2.TXT
copy %1\nu95upd\backup\TEMP2.TXT+%1\nu95upd\backup\TEMP.BAT %1\nu95upd\backup\UNPATCH.BAT >NUL
echo goto END >> %1\nu95upd\backup\UNPATCH.BAT
echo :NODOSBOX >> %1\nu95upd\backup\UNPATCH.BAT
echo echo Please restart Windows in MS-DOS mode by selecting "Start", >> %1\nu95upd\backup\UNPATCH.BAT
echo echo "Shut Down", "Restart the Computer in MS-DOS mode". Change to the >> %1\nu95upd\backup\UNPATCH.BAT
echo echo directory %1\nu95upd\backup and type UNPATCH. >> %1\nu95upd\backup\UNPATCH.BAT
echo :END >> %1\nu95upd\backup\UNPATCH.BAT
del %1\nu95upd\backup\TEMP.BAT >NUL
del %1\nu95upd\backup\TEMP1.BAT >NUL
del %1\nu95upd\backup\TEMP2.TXT >NUL
del %1\nu95upd\backup\UNPATCH.BAK >NUL
echo Patch Completed
set NU95DIR=
set SYMDIR=
pause
cls
GOTO END
:NODOSBOX
echo Please restart Windows in MS-DOS mode by selecting "Start", "Shut Down",
echo "Restart the Computer in MS-DOS mode". Change to the directory containing
echo the patch files and type RUNME C:, where C: is the drive where the NU files
echo are stored.
if not exist %1\nu95upd\error.dat echo NODOSBOX > %1\nu95upd\error.dat
goto END
:NOPROGDIR
echo The folder containing Norton Utilities could not be found on drive %1.
echo Please set the environment variable NU95DIR to the correct folder name
echo (without the leading drive letter) and re-run RUNME.BAT.
echo .
echo Example, SET NU95DIR=\NORTON
echo .
echo Make sure that there are no extra spaces surrounding the equal sign.
echo .
if not exist %1\nu95upd\error.dat echo NOPROGDIR > %1\nu95upd\error.dat
set NU95DIR=
goto END
:NOSYMDIR
echo The SYMANTEC directory could not be found on drive %SHARED%.
echo Please set the environment variable SYMDIR to the exact
echo location of this directory (without the leading drive letter)
echo and re-run RUNME.BAT.
echo .
echo Example, SET SYMDIR=\progra~1\symantec
echo .
echo Make sure that there are no extra spaces surrounding the equal sign.
echo .
if not exist %1\nu95upd\error.dat echo NOSYMDIR > %1\nu95upd\error.dat
set SYMDIR=
goto END
:PATCHERR
if not exist %1\nu95upd\error.dat echo PATCHERR > %1\nu95upd\error.dat
set NU95DIR=
set SYMDIR=
:END