WindowsXP-SP1/admin/wmi/wbem/scripting/samples/general/derivation.js

19 lines
411 B
JavaScript
Raw Normal View History

2001-01-01 00:00:00 +01:00
// This illustrates the handling of property array values
// using the VBArray helper
var locator = WScript.CreateObject ("WbemScripting.SWbemLocator");
var services = locator.ConnectServer (".", "root/cimv2");
var Class = services.Get ("Win32_logicaldisk");
var values = new VBArray (Class.Derivation_).toArray ();
for (var i = 0; i < values.length; i++)
WScript.Echo (values[i]);