Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
3.0 KiB

  1. @echo off
  2. echo Installing Windows NT NNTPSVC Server Performance Counters ....
  3. if "%1" == "quiet" goto Continue
  4. echo Press any key to continue or CTRL-C to exit.
  5. pause >nul
  6. :Continue
  7. :Evars -------------------------------------------------------------------------
  8. :. Only NT would have this evar set.
  9. if "%PROCESSOR_ARCHITECTURE%" == "" goto ErrProcessor
  10. :Conditions --------------------------------------------------------------------
  11. :. Check if NT is installed properly.
  12. if not exist %SystemRoot%\System32\lodctr.exe goto ErrWinDir
  13. if not exist %SystemRoot%\System32\ntoskrnl.exe goto ErrWinDir
  14. :ChkFiles ----------------------------------------------------------------------
  15. :. Check if the user is in the setup directory.
  16. if not exist nnictrs.bat goto ErrChkFiles
  17. :. Check if all the tools are there.
  18. if not exist nntpctrs.h goto ErrChkFiles
  19. if not exist nntpctrs.ini goto ErrChkFiles
  20. if not exist nntpctrs.reg goto ErrChkFiles
  21. if not exist regini.exe goto ErrChkFiles
  22. :. Check if all deliverables (required files) are there.
  23. if not exist nntpctrs.dll goto ErrChkFiles
  24. :Start Installation ------------------------------------------------------------
  25. :. Install the DLL.
  26. xcopy nntpctrs.dll %SystemRoot%\System32 /d /v
  27. if not exist %SystemRoot%\System32\nntpctrs.dll goto Failure
  28. :. Add the service to the Registry.
  29. regini nntpctrs.reg >nul
  30. if errorlevel 1 goto Failure
  31. lodctr nntpctrs.ini
  32. if errorlevel 1 goto Failure
  33. :Success
  34. echo.
  35. echo Successfully installed Windows NT NNTPSVC Server Performance Counters.
  36. goto CleanUp
  37. :Failure
  38. echo.
  39. echo ERROR: Unable to install the Windows NT NNTPSVC Server Performance Counters.
  40. goto CleanUp
  41. :. Errors ----------------------------------------------------------------------
  42. :ErrChkFiles
  43. echo ERROR: One or more files required by this installation is not found
  44. echo in the current directory.
  45. echo.
  46. echo Be sure that %0 is started from the installation directory.
  47. echo If installing the debug version, go to WINDEBUG;
  48. echo if installing the release version, go to WINREL.
  49. echo If this error still occurs, you may be missing files.
  50. echo Recopy the setup files from \\eleanm-j\Shuttle,
  51. echo or contact EleanM @x34716. 
  52. goto CleanUp
  53. :ErrProcessor
  54. echo ERROR: The PROCESSOR_ARCHITECTURE environment variable is not set.
  55. echo Windows NT may not be installed properly.
  56. goto CleanUp
  57. :ErrWinDir
  58. echo ERROR: Unable to find required files in %SystemRoot%\System32.
  59. echo Windows NT may not be installed properly.
  60. goto CleanUp
  61. :ErrNntpSvc
  62. echo ERROR: Unable to find %SystemRoot%\System32\nntpsvc.dll.
  63. echo The Windows NT NNTPSVC Server may not be installed properly.
  64. goto CleanUp
  65. :CleanUp -----------------------------------------------------------------------
  66. for %%v in (CFGFILE REGFILES) do set %%v=
  67. :End ---------------------------------------------------------------------------