Read DigitalProductId Value From Windows Registry in Ruby -


so far have code

require 'win32/registry'   win32::registry::hkey_local_machine.open('software\microsoft\windows nt\currentversion',win32::registry::key_all_access) |reg|   puts reg['digitalproductid']  end 

but doesn't allow me digitalproductid value. of values available of them not.

currentversion currentbuild softwaretype currenttype installdate registeredorganization registeredowner systemroot installationtype editionid productname currentbuildnumber buildlab buildlabex buildguid csdbuildnumber pathname 

it because running on 64 bit machine. not identify key "digitalproductid" registry untill change tragetplatform x64 bit cpu.

hope helps


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -