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.
|
|
var locator = WScript.CreateObject ("WbemScripting.SWbemLocator"); var services = locator.ConnectServer (".", "root/cimv2"); var classa = services.Get ("Win32_baseservice");
var props = classa.Properties_; WScript.Echo ("There are", props.Count, "properties"); var e = new Enumerator (props);
for (;!e.atEnd();e.moveNext()) { p = e.item ();
if (p.Value == null) WScript.Echo (p.Name, p.Origin, p.IsLocal, p.IsArray); else WScript.Echo (p.Name, "=", p, p.Origin, p.IsLocal, p.IsArray);
var eq = new Enumerator (p.Qualifiers_);
WScript.Echo ("\nQualifiers\n"); for (;!eq.atEnd();eq.moveNext()) { q = eq.item (); // Array values from COM are probably reported as "unknown" or "undefined"
WScript.Echo (q.Name, "[", typeof(q.Value), "]"); if (typeof(q.Value) != "unknown") WScript.Echo (q.Name, "=", q); else { var arrayval = new VBArray (q.Value).toArray(); WScript.Echo (arrayval.length); for (i = 0; i < arrayval.length; i++) WScript.Echo (arrayval[i]); } } }
|