Microsoft.Win32.RegistryKey ckey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@”SYSTEM\CurrentControlSet\Services\service1″, true);
if(ckey != null)
{
if(ckey.GetValue(“Type”) != null)
{
ckey.SetValue(“Type”, ((int)ckey.GetValue(“Type”) | 256));
}
}