kessler / node-regedit

Read, Write, List and do all sorts of funky stuff to the windows registry using node.js and windows script host
MIT License
277 stars 45 forks source link

impossible to create or read a key's default value #3

Closed rafipiccolo closed 9 years ago

rafipiccolo commented 9 years ago

hello, nice code but i can't use it for default values.

every key has a default value in the windows registry but i can't see it with the list method nor setting it with puvalue

regedit.list('HKCR\\Directory\\shell\openShell\\command', console.log);

// or 

regedit.putValue({
    'HKCR\\Directory\\shell\openShell\\command': {
        'default': { value 'test', type: 'REG_SZ'}
    }
}, console.log)

i tried "default" / "@" / ... it always creates me another key instead of setting the default one.

the same with .reg file would be : Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\openShell\command] @="test"

kessler commented 9 years ago

Thanks for reporting this, I'll look into it and get back to you asap...

kessler commented 9 years ago

Already found some references to the problem on the internet: http://stackoverflow.com/questions/8840343/how-to-read-the-default-value-from-registry-in-vbscript https://groups.google.com/forum/#!topic/microsoft.public.win32.programmer.wmi/10wMqGWIfms

Working on a fix.

rafipiccolo commented 9 years ago

nice :) i don't understand a thing in win32 api but i'll be glad to test it in my application when you need it

rafipiccolo commented 9 years ago

thanks ! now it works for me

ChenZengui commented 3 years ago

The same problem for me. Fixt?

ChenZengui commented 3 years ago

nice :)using type: "REG_DEFAULT" works!