最佳答案
How to check if a registry value exists by C# code? This is my code, I want to check if 'Start' exists.
public static bool checkMachineType()
{
RegistryKey winLogonKey = Registry.LocalMachine.OpenSubKey(@"System\CurrentControlSet\services\pcmcia", true);
string currentKey= winLogonKey.GetValue("Start").ToString();
if (currentKey == "0")
return (false);
return (true);
}