Shutdown or reboot Windows client computer and let user
decide to cancel or proceed with the system shutdown or reboot operation.
Batch file script that can be deployed via GPO to shutdown
or reboot client computers.
Batch file can be set via Task Scheduler and run at a
specified time.
The script provides the user to cancel the operation, so if
the user is in the midst of doing task that requires the system to be online
then the user can choose to abort the operation.
“IF /I” parameter on the script accepts "y" or
"Y", it does case insensitivity comparison.
If the input is not y or n, the batch file will keep asking until
user presses the desired key.
Here's the script:
@ECHO OFF
:xinvalid
SET /P yes_or_no="Your computer will initiate shutdown
in 10 min do you want continue (y/n): "
IF /I %yes_or_no% EQU y (
SHUTDOWN /S /F /T 600
echo "Okay let’s do it, let’s shutdown the
system."
TIMEOUT /T 5
exit
)
IF /I %yes_or_no% EQU n (
SHUTDOWN /A
echo "Shutdown cancelled, let's do it some other
time."
TIMEOUT /T 5
Exit
)
)
IF /I %yes_or_no% neq
y (
echo "Invalid input, press y or n keys only."
goto xinvalid
)
)
IF /I %yes_or_no% neq
n (
echo "Invalid input, press y or n keys only."
goto xinvalid
)
)
================================
Free Android Apps:
Click on links below to find out more:
Linux Android App cheat sheet:
https://play.google.com/store/apps/details?id=com.LinuxMobileKit
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
https://play.google.com/store/apps/details?id=com.myrosaryapp
http://quickbytesstuff.blogspot.sg/2014/09/how-to-recite-rosary.html
Divine Mercy Chaplet Guide (A Powerful prayer):
https://play.google.com/store/apps/details?id=com.dmercyapp
Comments
Post a Comment