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.

77 lines
2.3 KiB

  1. @echo off
  2. if (%PROCESSOR_ARCHITECTURE%)==() goto BadProcessor
  3. if (%WINDIR%)==() goto BadWinDir
  4. if not exist %WINDIR%\system32\ntoskrnl.exe goto BadWinDir
  5. rem if not exist %WINDIR%\system32\tcpsvcs.dll goto W3svcNotInstalled
  6. rem if not exist %WINDIR%\system32\w3svc.dll goto W3svcNotInstalled
  7. if %PROCESSOR_ARCHITECTURE%==x86 SET PROCESSOR_ARCHITECTURE=i386
  8. if not exist install.bat goto CannotInstall
  9. if not exist w3ctrs.h goto CannotInstall
  10. if not exist w3ctrs.ini goto CannotInstall
  11. if not exist w3ctrs.reg goto CannotInstall
  12. if not exist %_NTDRIVE%%_NTROOT%\public\sdk\lib\%PROCESSOR_ARCHITECTURE%\w3ctrs.dll goto CannotInstall
  13. echo Windows NT W3 Server Performance Counters Installation
  14. echo.
  15. echo This installation script makes the following assumptions:
  16. echo.
  17. echo o The Windows NT W3 Server has been properly installed.
  18. echo.
  19. echo o The LODCTR and REGINI utilities are on the path.
  20. echo.
  21. echo o This script is run from the W3CTRS directory.
  22. echo.
  23. echo If these assumptions are not valid, please correct and try again.
  24. echo Press CTRL-C to exist now, otherwise
  25. pause
  26. copy %_NTDRIVE%%_NTROOT%\public\sdk\lib\%PROCESSOR_ARCHITECTURE%\w3ctrs.dll %WINDIR%\system32 >nul 2>&1
  27. if errorlevel 1 goto InstallError
  28. if not exist %WINDIR%\system32\w3ctrs.dll goto InstallError
  29. regini w3ctrs.reg >nul 2>&1
  30. if errorlevel 1 goto InstallError
  31. lodctr w3ctrs.ini
  32. if errorlevel 1 goto InstallError
  33. echo.
  34. echo Windows NT W3 Server Performance Counters Installation successful.
  35. goto Done
  36. :InstallError
  37. echo.
  38. echo Cannot install the Windows NT W3 Server Performance Counters.
  39. goto Done
  40. :CannotInstall
  41. echo This installation script MUST be run from the W3CTRS
  42. echo directory on the appropriate Windows NT Resource Kit disk.
  43. goto Done
  44. :BadProcessor
  45. echo The PROCESSOR_ARCHITECTURE environment variable must be set to the
  46. echo proper processor type (X86, MIPS, etc) before running this script.
  47. goto Done
  48. :BadWinDir
  49. echo The WINDIR environment variable must point to the Windows NT
  50. echo installation directory (i.e. C:\NT).
  51. goto Done
  52. :W3svcNotInstalled
  53. echo The Windows NT W3 Server has not been properly installed
  54. echo on this system. Please install the Windows NT W3 Server
  55. echo before installing these performance counters.
  56. goto Done
  57. :Done
  58. if %PROCESSOR_ARCHITECTURE%==i386 SET PROCESSOR_ARCHITECTURE=x86
  59.