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.

30 lines
1.2 KiB

  1. Set obj = CreateObject( "Wmi.XMLTranslator" )
  2. obj.QualifierFilter = 0
  3. obj.HostFilter = True
  4. obj.DeclGroupType = 2
  5. 'res = obj.ExecQuery( "root/cimv2", "select * from WIN32_LogicalDisk" )
  6. 'res = obj.ExecQuery( "root/cimv2", "select * from WIN32_ProgramGroup" )
  7. res = obj.ExecQuery( "root/cimv2", "select * from WIN32_AllocatedResource" )
  8. 'res = obj.ExecQuery( "root/cimv2", "Select GroupName, Name, UserName FROM Win32_ProgramGroup" )
  9. 'res = obj.ExecQuery( "root/cimv2", "Select Name, Version, Manufacturer, SoftwareElementID, SoftwareElementState, TargetOperatingSystem FROM Win32_DriverVXD" )
  10. Stop
  11. Set dom1 = CreateObject( "Microsoft.XMLDOM" )
  12. Set dom2 = CreateObject( "Microsoft.XMLDOM" )
  13. dom1.loadXML( res )
  14. dom2.loadXML( "<?xml version=""1.0""?><DataCollection><Snapshot Timestamp=""10/7/1999 10:14:57 PM""></Snapshot></DataCollection>" )
  15. dom1.save( "c:\wmidump_direct.xml" )
  16. Set value = dom2.documentElement.selectSingleNode( "Snapshot" )
  17. value.appendChild( dom1.documentElement )
  18. dom2.save( "c:\wmidump.xml" )
  19. 'Set fso = CreateObject( "Scripting.FileSystemObject" )
  20. 'Set MyFile = fso.CreateTextFile("c:\wmidump.xml", True)
  21. 'MyFile.WriteLine(res)
  22. 'MyFile.Close