Menu

#1134 Registry keys with slashes not accessible

2.0 Series
closed-invalid
nobody
None
5
2019-08-22
2016-01-12
Marshall
No

When reading, writing and deleting registry keys, there is no way to do anything with a registry key whose name contains a slash.
For example
HKLM
+----SOFTWARE
+----somekeywith/aslash
+----child

DeleteRegKey HKLM SOFTWARE/somekeywith/aslash/child refers (rightly) to a 4-node key - there is no way to specify the 3-node key
Perhaps support escaping with backslashes? e.g.
DeleteRegKey HKLM SOFTWARE/somekeywith\/aslash/child

Discussion

  • Anders

    Anders - 2016-01-14

    Why are you using / slashes? This is Windows, use \ (backslash). Escaping would not help, NSIS passes the path directly to Windows.

    Section
    WriteRegStr HKCU "Software\NSIS\foo/bar\whatever" "" "whatever"
    MessageBox MB_OK "Check with Regedit"
    DeleteRegKey HKCU "Software\NSIS\foo/bar\whatever"
    MessageBox MB_OK "Check with Regedit"
    DeleteRegKey HKCU "Software\NSIS\foo/bar"
    SectionEnd
    
     
  • Anders

    Anders - 2016-01-14
    • status: open --> closed-invalid
     
  • olivier barthelemy

    Same case for \ in keys. In the case of App compatibility settings, windows itself writes \ in key names. https://blogs.technet.microsoft.com/mspfe/2013/11/21/disabling-dpi-scaling-on-windows-8-1-the-enterprise-way/ to use paths as keys
    So NSIS can not clear those keys. Using keys with slashes instead is not recognized by windows here

     
    • Anders

      Anders - 2019-08-22

      That link shows slashes in the value name, not the ** key name** (registry path). Slashes have always been legal in the value name.

       

Log in to post a comment.