puppetlabs / puppetlabs-registry

Puppet Module for managing the Windows Registry through custom types and providers
http://forge.puppetlabs.com/puppetlabs/registry
Apache License 2.0
24 stars 82 forks source link

Issue with value that could be treated as a path #35

Closed AutomationD closed 2 years ago

AutomationD commented 11 years ago

I'm having issues when having such construction:

registry::value { '%systemroot%\\system32\\inetsrv\\':          
            key=> 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths',
            type   => dword,
            data   => "0",              
        }

I also tried

registry::value { '%systemroot%\system32\inetsrv\\':            
            key=> 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths',
            type   => dword,
            data   => "0",              
        }

Please share some Idea, if I'm doing something wrong, but it seems like a bug to me, as provider treats backslashes in the name of the key as a part of the path to that key.

Thanks in advance.

joshcooper commented 10 years ago

It looks like you are mixing syntax from the registry::value defined type and the registry_value type. Try this:

registry_value { 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Antimalware\Exclusions\Paths\%systemroot%\system32\inetsrv':
  ensure => present,
  type   => dword,
  data   => '0',
}
chelnak commented 2 years ago

Hello! We are doing some house keeping and noticed that this issue has been open for a long time.\n\nWe're going to close it but please do raise another issue if the issue still persists. 😄