C# Create Values in Registry Local Machine

后端 未结 5 1792
闹比i
闹比i 2020-12-28 15:14

The following code is not working for me:

public bool createRegistry()
{
    if (!registryExists())
    {
        Microsoft.Win32.Registry.LocalMachine.Creat         


        
5条回答
  •  清酒与你
    2020-12-28 15:45

    Well you've got your answer already - I'm guessing you're running on Vista or Windows 7 (or Server 2008) and the process/user running the app doesn't have rights/permission to modify the registry.

    So its not a code problem as such but a systems admin one. Build the app and run as administrator and see if that works.

提交回复
热议问题