What are some alternatives to RegistryKey.OpenBaseKey in .NET 3.5?

后端 未结 3 2007
迷失自我
迷失自我 2020-11-30 12:35

I\'ve been working on an installer package and using RegistryKey.OpenBaseKey to work with custom actions that either open and add/remove keys to/from the 64-bit registry or

3条回答
  •  粉色の甜心
    2020-11-30 13:29

    Targeting needed registry:

    RegistryKey localMachine = Registry.LocalMachine; //For example
    

    and get the value that you need:

    RegistryKey lKey = localMachine.OpenSubKey(@"SOFTWARE\...\", false);
    

提交回复
热议问题