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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -