|
生成电源方案切换批处理.cmd
- @echo off
- powercfg -list >%temp%\powercfg.txt
- for /f "tokens=*" %%i in ('findstr /i /c:平衡 %temp%\powercfg.txt') do set pid=%%i
- echo powercfg setactive %pid:~11,37% >%SystemDrive%\[电源方案]平衡.cmd
- for /f "tokens=*" %%i in ('findstr /i /c:高性能 %temp%\powercfg.txt') do set pid=%%i
- echo powercfg setactive %pid:~11,37% >%SystemDrive%\[电源方案]高性能.cmd
- findstr /i /c:卓越性能 %temp%\powercfg.txt ||goto exit
- for /f "tokens=*" %%i in ('findstr /i /c:卓越性能 %temp%\powercfg.txt') do set pid=%%i
- echo powercfg setactive %pid:~11,37% >%SystemDrive%\[电源方案]卓越性能.cmd
- :exit
- del %temp%\powercfg.txt
复制代码 运行后在系统盘根目录生成平衡、高性能、卓越性能(如果有)快速切换批处理。
http://bbs.wuyou.net/forum.php?mod=viewthread&tid=416982 |
|