Access denied when creating registry key

后端 未结 3 1861
醉酒成梦
醉酒成梦 2021-01-07 03:54

I am trying to create a registry key at following location but I am getting access denied error:

HKEY_LOCAL_MACHINE\\SOFTWARE\\MyCompany\\MyProgram

3条回答
  •  忘掉有多难
    2021-01-07 04:29

    You need to run your application under an account that has sufficient privileges to write to the registry at the specified location. Usually the HKEY_LOCAL_MACHINE branch is reserved for power users because it contains machine global settings.

提交回复
热议问题