Hello,
I've a problem with the module "facter/util/registry"...
i want to read key / value from registry. On windows x86, it's OK but in on windows x64, i've this error:
ERROR: The system was unable to find the specified registry key or value.
i 've create a fact to know the version of ocs inventory and the version of fusioninventory-agent:
this line work
Facter::Util::Registry.hklm_read('SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\OCS Inventory Agent', 'DisplayVersion')
but this line doesn't work
Facter::Util::Registry.hklm_read('SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory-Agent', 'DisplayVersion')
for exemple, in cmd.exe, i can do:
C:\Windows\System32\reg.exe export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory-Agent" "C:\Uninstall.reg"
=> it's ok, i've my file uninstall.reg with my key FusionInventory-Agent
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory-Agent]
"DisplayName"="FusionInventory Agent 2.3.6 (x64 edition)"
"DisplayVersion"="2.3.6"
........
but with facter:
Facter::Util::Resolution.exec('C:\Windows\System32\reg.exe export "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\FusionInventory-Agent" "C:\Uninstall.reg"')
ERROR: The system was unable to find the specified registry key or value.
In fact, i want to know if it's possible with facter to read a 64 bit registry from facter...
Thank you and sorry for my english...