CollectionはEnumeratorで
WMIは面白そう。
Enumerator.prototype.each = function(f){ for(; !this.atEnd(); this.moveNext()){ f( this.item() ); } }; var services = GetObject("winmgmts:\\\\."); var objectSet = services.InstancesOf("Win32_LogicalMemoryConfiguration"); (new Enumerator(objectSet)).each(function(v){ WScript.Echo(v.TotalPhysicalMemory); });