cannot write to the registry key

前端 未结 4 2329
耶瑟儿~
耶瑟儿~ 2020-12-05 13:25

I am getting error cannot write to the registry key when i am trying to save my keys in the registry .

//Here is my code .

Note : I tried to run as an Admin

4条回答
  •  盖世英雄少女心
    2020-12-05 13:49

    You are probably falling foul of registry redirection. Perhaps you have a 32 bit process on a 64 bit system and writes to HKLM\Software get redirected to HKLM\Software\Wow6432Node.

    You need to open the 64 bit key directly, or compile for AnyCPU.

提交回复
热议问题