home *** CD-ROM | disk | FTP | other *** search
/ Network Support Encyclopedia 96-1 / novell-nsepro-1996-1-cd2.iso / download / netware / ntc3.exe / UPDATE.CMD < prev    next >
OS/2 REXX Batch file  |  1995-09-21  |  4KB  |  118 lines

  1. @echo off
  2.  
  3. :setup_environment
  4. rem **************************************************
  5. rem ***   Set for local environment changes only   ***
  6. rem **************************************************
  7.  
  8. SETLOCAL
  9.  
  10. rem *******************************
  11. rem ***   Set up our commands   ***
  12. rem *******************************
  13.  
  14. set releasename=NetWare Client for Windows NT Update
  15. set shtools=nwmv reboot
  16. set copycmd=copy
  17. set moveboot=nwmv
  18. set rebootcmd=reboot
  19.  
  20. rem *******************************************
  21. rem ***   Set up file names to be updated   ***
  22. rem *******************************************
  23.  
  24. set netwaresysfiles=ipxapi ipxspx nwfs nwip vmlid
  25. set netwaredllfiles=supwin32 nwapi32
  26.  
  27. echo This command file will initiate the installation of the
  28. echo %releasename%.
  29. echo.
  30. echo You must be logged into your NT workstation as the Administrator
  31. echo or as a user with Administrator equivalent rights.  If you do not
  32. echo have sufficient rights, press Ctrl-C to abort this command file,
  33. echo login as Administrator, and then re-run this command file
  34. echo to continue installation.
  35. echo.
  36. pause
  37.  
  38. :check_tools
  39. rem *********************************************************
  40. rem ***   Check to make sure needed tools are available   ***
  41. rem *********************************************************
  42.  
  43. echo Checking for needed tools...
  44. for %%i in (%shtools%) do (if NOT exist .\%%i.exe goto missing_tools)
  45. goto check_files
  46.  
  47. :missing_tools
  48. rem
  49. echo.
  50. echo Files are missing.  One (or more) of the following files could not
  51. echo be found in the current directory.  To successfully install the
  52. echo %releasename%, make sure you are running
  53. echo this script from the same directory where all the distrubition
  54. echo files are located.
  55. echo.
  56. echo %0 could not find one (or more) of the following files:
  57. echo.
  58. echo     %shtools%
  59. echo.
  60. goto end
  61.  
  62.  
  63. :check_files
  64. rem *************************************************************
  65. rem ***   Check for all files required by the client update   ***
  66. rem *************************************************************
  67.  
  68. echo Checking for %releasename% files...
  69. for %%i in (%netwaresysfiles%)  do (if NOT exist .\%%i.sys goto missing_files)
  70. for %%i in (%netwaredllfiles%) do (if NOT exist .\%%i.dll goto missing_files)
  71. goto copy_files
  72.  
  73. :missing_files
  74. echo.
  75. echo Files are missing.  One (or more) of the following files could not
  76. echo be found in the current directory.  To successfully install the
  77. echo %releasename%, make sure you are running
  78. echo this script from the same directory where all the distrubition
  79. echo files are located.
  80. echo.
  81. echo %0 could not find one (or more) of the following files:
  82. echo.
  83. echo   .SYSs:
  84. echo     %netwaresysfiles%
  85. echo.
  86. echo   .DLLs:
  87. echo     %netwaredllfiles%
  88. echo.
  89. goto end
  90.  
  91.  
  92. :copy_files
  93. rem *****************************************************
  94. rem ***   Copy all needed files to proper locations   ***
  95. rem *****************************************************
  96.  
  97. echo Copying files...
  98. echo.
  99. for %%i in (%netwaresysfiles%) do (%copycmd% .\%%i.sys %SystemRoot%\system32\netware\~%%i.sys && %moveboot% %SystemRoot%\system32\netware\~%%i.sys %SystemRoot%\system32\netware\%%i.sys)
  100. for %%i in (%netwaredllfiles%) do (%copycmd% .\%%i.dll %SystemRoot%\system32\~%%i.dll && %moveboot% %SystemRoot%\system32\~%%i.dll %SystemRoot%\system32\%%i.dll)
  101. echo.
  102.  
  103.  
  104. :needreboot
  105. rem ******************************************
  106. rem ***   Let user know they must reboot   ***
  107. rem ******************************************
  108.  
  109. echo %releasename% has been installed.
  110. echo You must now REBOOT the system for changes to become active.
  111. echo.
  112. %rebootcmd%
  113. goto end
  114.  
  115. :end
  116. ENDLOCAL
  117.  
  118.