10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

電源制御をコマンドで

Last updated at Posted at 2016-10-22

電源設定が七めんどくさい貴方へ。

powerplan.bat
rem ディスプレイの電源を切る
powercfg -x monitor-timeout-ac 15
powercfg -x monitor-timeout-dc 15

rem コンピュータをスリープ状態にする
powercfg -x standby-timeout-ac 30
powercfg -x standby-timeout-dc 30

rem 電源ボタンを押したときの動作(シャットダウン)
powercfg -setacvalueindex scheme_balanced sub_buttons pbuttonaction 3
powercfg -setdcvalueindex scheme_balanced sub_buttons pbuttonaction 3

rem カバーを閉じた時の動作(何もしない)
powercfg -setacvalueindex scheme_balanced sub_buttons lidaction 0
powercfg -setdcvalueindex scheme_balanced sub_buttons lidaction 0

rem 電源プランのエイリアス表示
powercfg /aliases
10
11
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?