# Win32ole and wmi

**URL:** <https://www.ruby-forum.com/t/win32ole-and-wmi/57815>\
**Category:** Ruby\
**Created:** [April 14, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/win32ole-and-wmi/57815 "2006-04-14T14:36:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad7a0](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/53a042/32.png) [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Post date:** [April 14, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/win32ole-and-wmi/57815/1 "2006-04-14T14:36:30Z")

</div>

In Python, this will list all of the instances of Win32\_BIOS:

import wmi  
c = wmi.WMI()  
for item in c.Win32\_BIOS():  
print item

In Ruby, I can’t do this. The closest I’ve come is this:

require ‘win32ole’  
bios = WIN32OLE.connect(“winmgmts:\\.”)  
bios.InstancesOf(“win32\_bios”).each do |b|  
puts b.serialnumber  
puts b.version  
puts b.smbiosbiosversion  
…  
…  
…  
end

Which means I have to know all of the Win32\_BIOS properties (and there  
are lots of them) defined here:

> **[Technical documentation](https://learn.microsoft.com/en-us/docs/)**

Is there a way to make Ruby do this more like Python?

Thanks,  
Brad
