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.

32 lines
943 B

  1. 'reads the list of domain controllers from the Microsoft_ADReplStatus
  2. 'provider, them launches MMC HEALTHMON.MSC with the
  3. '/Healthmon_Systems: parameter set appropriately
  4. 'History
  5. '11/23/99 Started by JonN
  6. '11/29/99 JonN: Preliminary version working
  7. Option Explicit
  8. Dim Provider
  9. Dim DomainControllerSet
  10. Dim DomainController
  11. Dim strCommand
  12. Dim blnFirst
  13. Dim Process
  14. Dim Result
  15. Set Provider = GetObject("winmgmts://.\root/MicrosoftADStatus")
  16. Set DomainControllerSet = Provider.InstancesOf("Microsoft_ADReplDomainController")
  17. strCommand = "mmc.exe d:\winnt\system32\wbem\healthmonitor\00000409\healthmonitor.msc /Healthmon_Systems:"
  18. blnFirst = True
  19. for each DomainController in DomainControllerSet
  20. If Not blnFirst then
  21. strCommand = strCommand + ","
  22. end if
  23. strCommand = strCommand + DomainController.CommonName
  24. blnFirst = False
  25. next
  26. Set Process = GetObject("winmgmts:Win32_Process")
  27. Result = process.Create(strCommand)