因此,在我的注册表中,我有“LocalMachine \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Run \”下的条目,称为“COMODO Internet Security”,这是我的防火墙。现在我想知道的是如何获得注册表来检查该条目是否存在?如果它确实做到了这一点,如果不这样做。我知道如何检查子项“运行”是否存在,但不是“COMODO Internet Security”的条目,这是我用来获取子项是否存在的代码。如果注册表项存在,如果是这样做,如果不这样做
using (RegistryKey Key = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run\"))
if (Key != null)
{
MessageBox.Show("found");
}
else
{
MessageBox.Show("not found");
}
好吧,我如何得到它在localmachine与getvalue? – NightsEVil 2010-07-24 23:36:50
添加示例。 – jwismar 2010-07-25 00:14:14
错误不能将类型'object'隐式转换为'string'。存在明确的转换(您是否缺少演员?) – NightsEVil 2010-07-25 01:53:47