Uploaded image for project: 'Modules'
  1. Modules
  2. MODULES-2957

Registry - Cannot manage registry values that have "\" as part of the name

    XMLWordPrintable

Details

    • Windows
    • Windows 2016-01-27, Modules 2017-01-11, Windows Kanban
    • Major
    • 1 - 1-5% of Customers
    • 4 - Major
    • 4 - $$$$$
    • Registry type is core for Windows users. We've not seen a lot of customer issues on this but consider it important to be fixed.
    • Automate
    • Automation should be extended to cover this bug

    Description

      https://msdn.microsoft.com/en-us/library/ms724946(VS.85).aspx

      registry::value { 'set install permissions':
    
        key  => 'HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers',
    
        value => 'C:\Program Files (x86)\some tool.exe',
    
        data  => "WINXPSP3 RUNASADMIN",
  
      }
      

      This example will error saying parent key of HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers\C:\Program Files (x86)\some tool.exe doesnt exist

      Details

      The issue is that the registry module uses "\" to separate key and subkey names and doesn't make a clear distinction of where the key/subkey names end and the name of the value begins. This means it cannot manage registry value names that include "\" as part of the name. We need to add an additional property (or parameter) that is explicitly the value for cases such as this so they are properly separated.

      Something like

      registry_value { 'app compat key':
        path => 'HKLM\Software\Microsoft',
        value_name => 'C:\Program Files (x86)\some tool.exe',
        data  => "WINXPSP3 RUNASADMIN",
      }
      

      And when value_name is used, use that explicitly as the name of the registry value instead of trying a path like we are doing now.

      Attachments

        Issue Links

          Activity

            People

              michael.lombardi Michael Lombardi
              rob Rob Reynolds
              Ryan Gard Ryan Gard
              Votes:
              3 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support