Leaked source code of windows server 2003
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.

20 lines
540 B

  1. on error resume next
  2. set s = GetObject("winmgmts:root\default")
  3. Set t_Class = s.Get
  4. t_Class.Path_.Class = "EXECNQUERYTEST01"
  5. Set Property = t_Class.Properties_.Add ("p", 19)
  6. Property.Qualifiers_.Add "key", true
  7. t_Class.Put_
  8. set e = s.ExecNotificationQuery _
  9. ("select * from __instancecreationevent where targetinstance isa 'EXECNQUERYTEST01'")
  10. if err <> 0 then
  11. Wscript.Echo err.number, err.description, err.source
  12. end if
  13. c = e.Count
  14. if err <> 0 then
  15. Wscript.Echo err.number, err.description, err.source
  16. end if