2014-08-28 21 views

回答

0

用這些代碼創建一個.bat文件。

CD C:\ Windows \ System32下 POWERCFG -change -monitor超時-AC 0 POWERCFG -change -monitor超時-DC 0 POWERCFG -change -disk超時-AC 0 POWERCFG -change -disk -timeout-DC 0 POWERCFG -change -standby超時-AC 0 POWERCFG -change -standby超時直流0 POWERCFG -change -HIBERNATE超時-AC 0 POWERCFG -change -HIBERNATE超時直流0 POWERCFG -change -processor-throttle-ac ADAPTIVE POWERCFG -change -processor-throttle-dc ADAPTIVE

then

Process.Start(「MyPath」);

0

所有特定於操作系統的高級功能都需要使用COM Interop來封裝Windows API DLL,以便它們可以在託管環境中使用。我建議你搜索與你想要控制的Windows版本相關的Windows SDK,然後搜索那些高級電源選項 - 這些功能通常不是.NET框架本地的。