Last active
April 7, 2021 23:48
-
-
Save dima-iholkin/65465dbcdafa49b168d3b618e5ebcd27 to your computer and use it in GitHub Desktop.
Win10 hibernate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
SETLOCAL enabledelayedexpansion | |
SET /p var=Want to Hibernate? [Y/N]: | |
@REM Convert y to Y: | |
IF %var%== y ( | |
SET var=Y | |
) | |
IF %var%== Y ( | |
START "" "C:\Windows\System32\shutdown.exe" /h | |
) ELSE ( | |
@REM echo Canceled. | |
@REM pause | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment