using System;
using Microsoft.Win32;
namespace Win7游戲全屏補丁
{
class Program
{
static void Main(string[] args)
{
RegistryKey system_key = Registry.LocalMachine.OpenSubKey("SYSTEM");
if (system_key != null)
{
RegistryKey ControlSet001_key = system_key.OpenSubKey("ControlSet001");
if (ControlSet001_key != null)
{
RegistryKey Control_key = ControlSet001_key.OpenSubKey("Control");
if (Control_key != null)
{
RegistryKey GraphicsDrivers_key = Control_key.OpenSubKey("GraphicsDrivers");
if (GraphicsDrivers_key != null)
{
RegistryKey Configuration_key = GraphicsDrivers_key.OpenSubKey("Configuration");
if (Configuration_key != null)
{
string[] keynames = Configuration_key.GetSubKeyNames();
foreach (string name in keynames)
{
if (name.StartsWith("INL"))
{
RegistryKey Inl_key = Configuration_key.OpenSubKey(name);
if (Inl_key != null)
{
RegistryKey oo_key = Inl_key.OpenSubKey("00");
if (oo_key != null)
{
RegistryKey ooo_key = oo_key.OpenSubKey("00", true);
if (ooo_key != null)
{
if ((int)ooo_key.GetValue("Scaling") != 3)
{
ooo_key.SetValue("Scaling", 3);
}
Console.WriteLine("補丁已成功打上.");
}
}
}
}
}
}
}
}
}
}
Console.ReadKey();
}
}
}