Hi,
I trying to create a batch file for hibernate on/off.
I tried this:
echo off
:Ask
echo Activating Hibernate (Y/N)?
:INPUT
set /P INPUT=Type input: %=%
If /I "%INPUT%"=="y" goto yes
If /I "%INPUT%"=="n" goto no
echo Incorrect input & goto Ask
:yes
C:\Windows\System32\powercfg.exe /hibernate on
pause
:no
C:\Windows\System32\powercfg.exe /hibernate off
pause
But I want to use it without "right click -> Run As Admin."
Can you help me how to do this.
Thank you.
I trying to create a batch file for hibernate on/off.
I tried this:
echo off
:Ask
echo Activating Hibernate (Y/N)?
:INPUT
set /P INPUT=Type input: %=%
If /I "%INPUT%"=="y" goto yes
If /I "%INPUT%"=="n" goto no
echo Incorrect input & goto Ask
:yes
C:\Windows\System32\powercfg.exe /hibernate on
pause
:no
C:\Windows\System32\powercfg.exe /hibernate off
pause
But I want to use it without "right click -> Run As Admin."
Can you help me how to do this.
Thank you.
My Computer
- OS
- Windows 7 Ultimate