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.

61 lines
1.6 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. if %PROCESSOR_ARCHITECTURE%==x86 SET PROCESSOR_ARCHITECTURE=i386
  6. if not exist remove.bat goto CannotRemove
  7. if not exist w3ctrs.h goto CannotRemove
  8. if not exist w3ctrs.ini goto CannotRemove
  9. if not exist w3ctrs.reg goto CannotRemove
  10. echo Windows NT W3 Server Performance Counters Removal
  11. echo.
  12. echo This removal script makes the following assumptions:
  13. echo.
  14. echo o The UNLODCTR utility is on the path.
  15. echo.
  16. echo o This script is run from the W3CTRS directory.
  17. echo.
  18. echo If these assumptions are not valid, please correct and try again.
  19. echo Press CTRL-C to exist now, otherwise
  20. pause
  21. if exist %WINDIR%\system32\w3ctrs.dll del %WINDIR%\system32\w3ctrs.dll >nul 2>&1
  22. unlodctr W3SVC
  23. if errorlevel 1 goto RemoveError
  24. echo.
  25. echo Windows NT W3 Server Performance Counters Removal successful.
  26. goto Done
  27. :RemoveError
  28. echo.
  29. echo Cannot remove the Windows NT W3 Server Performance Counters.
  30. goto Done
  31. :CannotRemove
  32. echo This removal script MUST be run from the W3CTRS
  33. echo directory on the appropriate Windows NT Resource Kit disk.
  34. goto Done
  35. :BadProcessor
  36. echo The PROCESSOR_ARCHITECTURE environment variable must be set to the
  37. echo proper processor type (X86, MIPS, etc) before running this script.
  38. goto Done
  39. :BadWinDir
  40. echo The WINDIR environment variable must point to the Windows NT
  41. echo installation directory (i.e. C:\NT).
  42. goto Done
  43. :Done
  44. if %PROCESSOR_ARCHITECTURE%==i386 SET PROCESSOR_ARCHITECTURE=x86
  45.