C#读取注册表的sample code
object officeServerPremium = Microsoft.Win32.Registry.GetValue( @"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office Server\12.0", "OfficeServerPremium", 1);
各参数的意义:
public static Object GetValue( string keyName, string valueName, Object defaultValue )
参考资料
Registry.GetValue Method
http://msdn.microsoft.com/en-us/library/microsoft.win32.registry.getvalue.aspx