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   
DOS Batch File  |  1996-02-01  |  4KB  |  103 lines

  1. @echo off
  2.  
  3. if not x%windir%x==xx GOTO NODOSBOX
  4.  
  5. if not x%NU95DIR%x==xx GOTO NUFOUND
  6.  
  7. set NU95DIR=\PROGRA~1\NORTON~1
  8. if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
  9. set NU95DIR=\PROGRA~1\NORTON~2
  10. if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
  11. set NU95DIR=\PROGRA~1\NORTON~3
  12. if exist %1%NU95DIR%\SIWNU.DLL goto NUFOUND
  13. set NU95DIR=\PROGRA~1\NORTON~4
  14. :NUFOUND
  15. if not exist %1%NU95DIR%\SIWNU.DLL goto NOPROGDIR
  16.  
  17. if not x%SYMDIR%x==xx GOTO SYMFOUND
  18.  
  19. set SYMDIR=\progra~1\symantec
  20.  
  21. :SYMFOUND
  22. if not exist %SHARED%%SYMDIR%\NPROTECT.VXD goto NOSYMDIR
  23.  
  24. if not exist %1\nu95upd\backup\nul  md %1\nu95upd\backup
  25. if exist %1\nu95upd\backup\UNPATCH.BAT del %1\nu95upd\backup\UNPATCH.BAT >NUL
  26. if exist %1\nu95upd\backup\TEMP.BAT del %1\nu95upd\backup\TEMP.BAT >NUL
  27. if exist %1\nu95upd\backup\TEMP1.BAT del %1\nu95upd\backup\TEMP1.BAK >NUL
  28. if exist %1\nu95upd\backup\TEMP2.TXT del %1\nu95upd\backup\TEMP2.TXT >NUL
  29. if exist %1\nu95upd\backup\UNPATCH.BAK del %1\nu95upd\backup\UNPATCH.BAK >NUL
  30. echo This may take awhile. Please be patient.
  31. echo Patching Norton Utilities program files...
  32. patch /Q /S /B:%1\nu95upd\backup  %1%NU95DIR%   nu95ptch
  33. if ERRORLEVEL != 0 goto PATCHERR
  34. rename %1\nu95upd\backup\UNPATCH.BAK TEMP1.BAT >NUL
  35. echo Patching Symantec shared directory files...
  36. patch /Q /NOS /B:%1\nu95upd\backup  %SHARED%%SYMDIR%  symptch
  37. if ERRORLEVEL != 0 goto PATCHERR
  38. copy  %1\nu95upd\backup\UNPATCH.BAK+%1\nu95upd\backup\TEMP1.BAT %1\nu95upd\backup\TEMP.BAT >NUL
  39. echo @echo off > %1\nu95upd\backup\TEMP2.TXT
  40. echo if not x%%windir%%x==xx GOTO NODOSBOX >> %1\nu95upd\backup\TEMP2.TXT
  41. copy  %1\nu95upd\backup\TEMP2.TXT+%1\nu95upd\backup\TEMP.BAT %1\nu95upd\backup\UNPATCH.BAT >NUL
  42. echo goto END >>  %1\nu95upd\backup\UNPATCH.BAT
  43. echo :NODOSBOX >> %1\nu95upd\backup\UNPATCH.BAT
  44. echo echo Please restart Windows in MS-DOS mode by selecting "Start", >> %1\nu95upd\backup\UNPATCH.BAT
  45. echo echo "Shut Down", "Restart the Computer in MS-DOS mode". Change to the  >> %1\nu95upd\backup\UNPATCH.BAT
  46. echo echo directory %1\nu95upd\backup and type UNPATCH. >> %1\nu95upd\backup\UNPATCH.BAT
  47. echo :END >>  %1\nu95upd\backup\UNPATCH.BAT
  48. del %1\nu95upd\backup\TEMP.BAT >NUL
  49. del %1\nu95upd\backup\TEMP1.BAT >NUL
  50. del %1\nu95upd\backup\TEMP2.TXT >NUL
  51. del %1\nu95upd\backup\UNPATCH.BAK >NUL
  52. echo Patch Completed
  53. set NU95DIR=
  54. set SYMDIR=
  55. pause
  56. cls
  57.  
  58. GOTO END
  59.  
  60. :NODOSBOX
  61. echo Please restart Windows in MS-DOS mode by selecting "Start", "Shut Down",
  62. echo "Restart the Computer in MS-DOS mode". Change to the directory containing
  63. echo the patch files and type RUNME C:, where C: is the drive where the NU files
  64. echo are stored.
  65. if not exist %1\nu95upd\error.dat echo NODOSBOX > %1\nu95upd\error.dat
  66. goto END
  67.  
  68. :NOPROGDIR
  69. echo The folder containing Norton Utilities could not be found on drive %1.
  70. echo Please set the environment variable NU95DIR to the correct folder name
  71. echo (without the leading drive letter) and re-run RUNME.BAT.
  72. echo .
  73. echo       Example,      SET NU95DIR=\NORTON
  74. echo .
  75. echo Make sure that there are no extra spaces surrounding the equal sign.
  76. echo .
  77. if not exist %1\nu95upd\error.dat echo NOPROGDIR > %1\nu95upd\error.dat
  78. set NU95DIR=
  79. goto END
  80.  
  81.  
  82. :NOSYMDIR
  83. echo The SYMANTEC directory could not be found on drive %SHARED%.
  84. echo Please set the environment variable SYMDIR to the exact
  85. echo location of this directory (without the leading drive letter)
  86. echo and re-run RUNME.BAT.
  87. echo .
  88. echo               Example, SET SYMDIR=\progra~1\symantec
  89. echo .
  90. echo Make sure that there are no extra spaces surrounding the equal sign.
  91. echo .
  92. if not exist %1\nu95upd\error.dat echo NOSYMDIR > %1\nu95upd\error.dat
  93. set SYMDIR=
  94. goto END
  95.  
  96. :PATCHERR
  97. if not exist %1\nu95upd\error.dat echo PATCHERR > %1\nu95upd\error.dat
  98. set NU95DIR=
  99. set SYMDIR=
  100.  
  101. :END
  102.  
  103.