Hello Guys,
I need to get some bios data [eg. service tag, bios version] from a
Win box and I’d like to do it in ruby.
Could you point me in the right direction ?
Thanks.
Hello Guys,
I need to get some bios data [eg. service tag, bios version] from a
Win box and I’d like to do it in ruby.
Could you point me in the right direction ?
Thanks.
Hi,
Hello Guys,
I need to get some bios data [eg. service tag, bios version] from a
Win box and I’d like to do it in ruby.
Could you point me in the right direction ?Thanks.
You can get information about Hardware via Registry like this:
require ‘win32/registry.rb’
Win32::Registry::HKEY_LOCAL_MACHINE.open(‘HARDWARE\DESCRIPTION\System’) do
reg>
puts “SystemBiosDate: #{reg[‘SystemBiosDate’]}”
puts “SystemBiosVersion: #{reg[‘SystemBiosVersion’][0]}”
end
Regards,
Park Heesob
From: “Bermejo, Rodrigo (GEAE, Foreign National)”
“Park Heesob” phasis@bcline.com wrote in message news:007f01c3c5d4$06fb58a0$6a1e213d@intheline.com…
Hi,
From: “Bermejo, Rodrigo (GEAE, Foreign National)”Hello Guys,
I need to get some bios data [eg. service tag, bios version] from a
Win box and I’d like to do it in ruby.
Could you point me in the right direction ?Thanks.
You can get information about Hardware via Registry like this:
require ‘win32/registry.rb’
Win32::Registry::HKEY_LOCAL_MACHINE.open(‘HARDWARE\DESCRIPTION\System’) do
reg>
puts “SystemBiosDate: #{reg[‘SystemBiosDate’]}”
puts “SystemBiosVersion: #{reg[‘SystemBiosVersion’][0]}”
end
When I run this, I get:
C:\tmp1>ruby bios_reg.rb
SystemBiosDate: 02/26/03
c:/programs/ruby/lib/ruby/1.8/win32/registry.rb:665:in read': The system cannot find the file specified. (Win32::Registry::Error) from c:/programs/ruby/lib/ruby/1.8/win32/registry.rb:688:in
’
from bios_reg.rb:5
from bios_reg.rb:3:in open' from c:/programs/ruby/lib/ruby/1.8/win32/registry.rb:605:in
open’
from bios_reg.rb:3
So the bios date works ok, but not the version part. Any idea what the problem is?
Phil