I tried every possible combination of params to write-resource to no avail. All I want to do is create a folder in HKEY_CLASSES_ROOT, and write entries into it.
(write-resource "HKEY_CLASSES_ROOT"
"\\MyFolder" "" #:create-key? #t)
etc...
I tried with and without #:type. Either I get the mred.ini file in home, or I get an entry directly in HKEY_CLASSES_ROOT, but never a folder with any entry in it.
It may have something to do with permissions on HKEY_CLASSES_ROOT. Like you, I was unable to get write-resource to create any subkeys (the term for registry “folders”) in that section.
However, it worked as expected when using a different section: