fresc81 / node-winreg

node module that provides access to the Windows Registry through the REG commandline tool
211 stars 60 forks source link

Cannot write to HKCR #39

Closed MrBlenny closed 7 years ago

MrBlenny commented 7 years ago

I am trying to write some keys to HKCR - this does not seem to work:

ERROR: Access is denied.
    at mkErrorMsg (app\node_modules\winreg\lib\registry.js:117:12)
    at ChildProcess.<anonymous> (app\node_modules\winreg\lib\registry.js:735:10)

Is this expected? Should access to HKCR be restricted for an application NOT running in admin mode (even if the user is an admin)?

MrBlenny commented 7 years ago

I suppose this is expected as we should write to HKCU\\Software\\Classes\ - This can be closed

fresc81 commented 7 years ago

Yes, write access to HKCR is restricted to elevated processes. So this is what you would expect. But you can always check access to the particular key using REGEDIT. I don't know how the menu item is called in your language, but there should be a permission setting available in the context menu for each key.