I should read the values of some registry keys like ''HKLM\SOFTWARE\Puppet\WCM\Initial_Setup''. How can I do this? Thanx Tinu -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
There is the registry module ( http://forge.puppetlabs.com/puppetlabs/registry) although it doesn''t appear to let you read a value in the registry. -- Rob Reynolds Developer, Puppet Labs *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **Register now and take advantage of the Final Countdown discount - save 15%!* On Thu, Jul 25, 2013 at 10:04 AM, tinu <tinu.walther@gmail.com> wrote:> I should read the values of some registry keys like > ''HKLM\SOFTWARE\Puppet\WCM\Initial_Setup''. > > How can I do this? > > Thanx > > Tinu > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Hi Tinu, On Thu, Jul 25, 2013 at 8:04 AM, tinu <tinu.walther@gmail.com> wrote:> I should read the values of some registry keys like > ''HKLM\SOFTWARE\Puppet\WCM\Initial_Setup''. > > How can I do this? > > Thanx > > Tinu > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > >Something like this should work: require ''win32/registry'' Win32::Registry::HKEY_LOCAL_MACHINE.open(*''*SOFTWARE\Puppet\WCM\Initial_Setup'') do |reg| value = reg[''foo''] end Note win32/registry is part of the ruby stdlib: http://ruby-doc.org/stdlib-1.9.3/libdoc/dl/rdoc/Win32/Registry.html There are also methods to read values as REG_DWORD, REG_EXPAND_SZ, etc. Josh -- Josh Cooper Developer, Puppet Labs *Join us at PuppetConf 2013, August 22-23 in San Francisco - * http://bit.ly/pupconf13* **Register now and take advantage of the Final Countdown discount - save 15%!* -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Seemingly Similar Threads
- chocolatey, windows, powershell and fault bucket
- Puppet Windows package not seeing DisplayName in Registry?
- mtime/md5lite with puppet 3.x bug Bug #13199
- "puppet module install simondean/iis" gives error "Error: cert already in hash table"
- Puppetmaster 3.2.3 logging different than previous versions