fresc81 / node-winreg

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

Cannot write key to HKLM even as Admin #34

Open kokarn opened 8 years ago

kokarn commented 8 years ago

Might be a duplicate of #16 but for the sake of consistency i'll add it here as well.

I'm running as admin (the title of the window says Administrator: Command Prompt).

I can't view and/or edit the key with the Regedit either, even when running as admin. I can't even change the permissions of the key with Regedit.

My guess is our system admins have locked it down in a way I can't override but that's just a guess so far.

fresc81 commented 8 years ago

How did you start the console? It's not only the user who must have admin, also the process must be launched with "elevated" rights. For me this works by right clicking the console shortcut and selecting the item with the shield icon in front of it, called something like "run as admin" (I run my Windows in German language). Apart from that I'm not able to reproduce your error.

kokarn commented 8 years ago

I started it exactly like that, with the shield saying "Run as administrator".

I think this specific error is related to global user rights, as in system admin because I can change other things but not the keys I was looking for.

fresc81 commented 8 years ago

That's weird. Could it be some antivirus program blocking access to it? Or maybe you can configure it using Windows policies. But I can't really help you there.

kokarn commented 8 years ago

I know, figured i'd just add this here so you've got it logged for future users. If i manage to find out if that's the case and how to detect it i'll update.

fresc81 commented 8 years ago

I added some notes on this to the README file. We can leave this open for now.

omen7288 commented 8 years ago

This might be unrelated, however judging by the comments, I saw similar characteristics while trying to write to HKLM\Software\ and the values were not being set (although stdout and return codes indicated success). Turns out, I was not specifying x64 so the keys were under HKLM\SOFTWARE\WOW6432Node. Kokarn, which keys were you attempting to write to?