另外,操作注册表也是可以实现的 开启硬件优化用记事本编辑以下内容: Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vxd\BIOS]"CPUPriority"=dword:00000001"PCIConcur"=dword:00000001"FastDRAM"=dword:00000001"AGPConcur"=dword:00000001保存为开启硬件优化.reg导入你的注册表就行了
现成的CODE没有,与WMI相关的代码可以参考:http://www.cnblogs.com/thunderdanky/articles/1230372.html
开启硬件优化用记事本编辑以下内容:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Vxd\BIOS]"CPUPriority"=dword:00000001"PCIConcur"=dword:00000001"FastDRAM"=dword:00000001"AGPConcur"=dword:00000001保存为开启硬件优化.reg导入你的注册表就行了
{
string agp = @"SYSTEM\CurrentControlSet\Services\Vxd\BIOS";
RegistryKey key = Registry.LocalMachine.OpenSubKey(agp, true);
key.SetValue("CPUPriority", (open)?1:0);
key.SetValue("PCIConcur", (open) ? 1 : 0);
key.SetValue("FastDRAM", (open) ? 1 : 0);
key.SetValue("AGPConcur", (open) ? 1 : 0);
}
CurrentControlSet\Services\
下面没有 Vxd 键