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.

73 lines
2.6 KiB

  1. @echo off
  2. echo Removing 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\ntoskrnl.exe goto ErrWinDir
  13. if not exist %SystemRoot%\System32\unlodctr.exe goto ErrWinDir
  14. :ChkFiles ----------------------------------------------------------------------
  15. :. Check if the user is in the setup directory.
  16. if not exist nnrctrs.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. :Start Removal -----------------------------------------------------------------
  22. :. Delete the DLL.
  23. del %SystemRoot%\System32\nntpctrs.dll >nul
  24. if errorlevel 1 echo WARNING: %SystemRoot%\System32\nntpctrs.dll is not found.
  25. :. Remove the service from the Registry.
  26. unlodctr NntpSvc
  27. if errorlevel 1 goto Failure
  28. :Success
  29. echo.
  30. echo Successfully removed Windows NT NNTPSVC Server Performance Counters.
  31. goto CleanUp
  32. :Failure
  33. echo.
  34. echo WARNING: Unable to remove the Windows NT NNTPSVC Server Performance Counters.
  35. goto CleanUp
  36. :. Errors ----------------------------------------------------------------------
  37. :ErrChkFiles
  38. echo ERROR: One or more files required by this installation is not found
  39. echo in the current directory.
  40. echo.
  41. echo Be sure that %0 is started from the installation directory.
  42. echo If installing the debug version, go to WINDEBUG;
  43. echo if installing the release version, go to WINREL.
  44. echo If this error still occurs, you may be missing files.
  45. echo Recopy the setup files from \\eleanm-j\Shuttle,
  46. echo or contact EleanM @x34716. 
  47. goto CleanUp
  48. :ErrProcessor
  49. echo ERROR: The PROCESSOR_ARCHITECTURE environment variable is not set.
  50. echo Windows NT may not be installed properly.
  51. goto CleanUp
  52. :ErrWinDir
  53. echo ERROR: Unable to find required files in %SystemRoot%\System32.
  54. echo Windows NT may not be installed properly.
  55. goto CleanUp
  56. :CleanUp -----------------------------------------------------------------------
  57. :End ---------------------------------------------------------------------------