禁用reg文件:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters]
“AMLIMaxCTObjs”=hex:04,00,00,00
“Attributes”=dword:00000070
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters\WakeUp]
“FixedEventMask”=hex:20,05
“FixedEventStatus”=hex:00,84
“GenericEventMask”=hex:18,50,00,10
“GenericEventStatus”=hex:10,00,ff,00
恢复reg文件:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters]
“AMLIMaxCTObjs”=hex:05,00,00,00
“Attributes”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters\WakeUp]
“FixedEventMask”=hex:20,01
“FixedEventStatus”=hex:00,85
“GenericEventMask”=hex:00,00,00,00,00,00,00,00
“GenericEventStatus”=hex:00,00,c3,46,00,00,00,00
问一下怎么样在C#中执行上面两段代码达到写入注册表的效果?
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters]
“AMLIMaxCTObjs”=hex:04,00,00,00
“Attributes”=dword:00000070
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters\WakeUp]
“FixedEventMask”=hex:20,05
“FixedEventStatus”=hex:00,84
“GenericEventMask”=hex:18,50,00,10
“GenericEventStatus”=hex:10,00,ff,00
恢复reg文件:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters]
“AMLIMaxCTObjs”=hex:05,00,00,00
“Attributes”=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ACPI\Parameters\WakeUp]
“FixedEventMask”=hex:20,01
“FixedEventStatus”=hex:00,85
“GenericEventMask”=hex:00,00,00,00,00,00,00,00
“GenericEventStatus”=hex:00,00,c3,46,00,00,00,00
问一下怎么样在C#中执行上面两段代码达到写入注册表的效果?
解决方案
10
将上面的两段保存为两个.reg的文件
Process.Start(“regedit”, “/s ” + 你的reg文件)
Process.Start(“regedit”, “/s ” + 你的reg文件)
3
7
Process.Start(“regedit”, “/s ” + 你的reg文件);
不是告诉你了么
不是告诉你了么