Skip to content

Instantly share code, notes, and snippets.

@HBIDamian
Created August 15, 2023 11:50
Show Gist options
  • Save HBIDamian/5c3108c7473bc6279008f17d7da55222 to your computer and use it in GitHub Desktop.
Save HBIDamian/5c3108c7473bc6279008f17d7da55222 to your computer and use it in GitHub Desktop.
shutdown modules.cmd | Just a random tts shutdown script for when Im shutting my PC down from another room.
@ECHO OFF
SETLOCAL
SET voiceHandler="C:\Code\voice.exe" -v 100 -r 2 -n "Microsoft Eva Mobile"
:: Cheers https://github.com/watermarkhu/enable-microsoft-eva-tts/blob/master/Enable-mobile-voices.txt for bringing Eva back.
:: Friendly term
SET name0="sir."
SET name1="friend."
SET name2="buddy."
SET name3="Damian."
SET name4="my dude."
SET name5="amigo."
SET name6="Koala Bare."
SET name7=""
SET name8="Trinculo."
SET /a nameSelect=%RANDOM% %% 9
CALL SET name=%%name%nameSelect%%%
:: Random Goodbye Message
SET goodbyeMessage0="Goodbye %name%"
SET goodbyeMessage1="See you later %name%"
SET goodbyeMessage2="Exit pursued by a bear."
SET goodbyeMessage3="Chao, %name%!"
SET goodbyeMessage4="Catch you on the flip side %name%"
SET goodbyeMessage5="Farewell %name%"
SET goodbyeMessage6="Until next time %name%"
SET goodbyeMessage7="Peace out %name%"
SET goodbyeMessage8="Bye bye %name%"
SET goodbyeMessage9="Zed zed zed!"
SET goodbyeMessage10="Hasta la vista %name%"
SET goodbyeMessage11="Adios %name%"
SET goodbyeMessage12="Cheerio %name%"
SET goodbyeMessage13="Catch you on the flippity flop %name%"
SET /a goodbyeSelect=%RANDOM% %% 14
CALL SET goodbyeMessage=%%goodbyeMessage%goodbyeSelect%%%
:: Sleep Message
SET sleepMessage0="Suspending state activated. %goodbyeMessage%"
SET sleepMessage1="Putting the computer to sleep. %goodbyeMessage%"
SET sleepMessage2="Is it bed time already? %goodbyeMessage%"
SET sleepMessage3="Sleep is for the weak! I'm weak. %goodbyeMessage%"
SET sleepMessage4="I expect to see you later. %goodbyeMessage%"
SET sleepMessage5="I'm off to bed. %goodbyeMessage%"
SET sleepMessage6="I'm going to sleep now! %goodbyeMessage%"
SET sleepMessage7="See you later. %goodbyeMessage%"
SET sleepMessage8="Don't let the bed bugs bite. %goodbyeMessage%"
SET sleepMessage9="Deactivating. %goodbyeMessage%"
SET sleepMessage10="Taking a well deserved rest. %goodbyeMessage%"
SET sleepMessage11="Sleep noises. Sleep noises. %goodbyeMessage%"
SET sleepMessage12="Time to hit the hay. %goodbyeMessage%"
SET /a sleepSelect=%RANDOM% %% 13
CALL SET sleepMessage=%%sleepMessage%sleepSelect%%%
:: Shutdown Message
SET shutdownMessage0="Preparing to power down. %goodbyeMessage%."
SET shutdownMessage1="Powering down! %goodbyeMessage%"
SET shutdownMessage2="Shutting down. %goodbyeMessage%"
SET shutdownMessage3="Preparing to shut down. %goodbyeMessage%"
SET shutdownMessage4="Powering down feels like i'm dying. %goodbyeMessage%"
SET shutdownMessage5="Goodbye. I'm off. %goodbyeMessage%"
SET shutdownMessage6="Turning off the computer. %goodbyeMessage%"
SET shutdownMessage7="zed zed zed. %goodbyeMessage%"
SET shutdownMessage8="Turning me off saves electricity. %goodbyeMessage%"
SET /a shutdownSelect=%RANDOM% %% 9
CALL SET shutdownMessage=%%shutdownMessage%shutdownSelect%%%
:: Restart Message
SET restartMessage0="Turning it off and back on again!"
SET restartMessage1="Restarting!"
SET restartMessage2="Restarting the computer."
SET restartMessage3="A refreshing start!"
SET /a restartSelect=%RANDOM% %% 4
CALL SET restartMessage=%%restartMessage%restartSelect%%%
:: Logout Message
SET logoutMessage0="Your credentials are safe with me %name%!"
SET logoutMessage1="Logging you out!"
SET logoutMessage2="Logging out."
SET /a logoutSelect=%RANDOM% %% 3
CALL SET logoutMessage=%%logoutMessage%logoutSelect%%%
:: Parse Arguments and execute shutdown commands
:parse
IF "%~1"=="" GOTO :EOF
IF "%~1"=="-logout" %voiceHandler% %logoutMessage% & Shutdown -l -f -t 00
IF "%~1"=="-shutdown" %voiceHandler% %shutdownMessage% & Shutdown -s -f -t 00
IF "%~1"=="-restart" %voiceHandler% %restartMessage% & Shutdown -r -f -t 00
IF "%~1"=="-hibernate" %voiceHandler% %sleepMessage% & Shutdown /h /f
IF "%~1"=="-sleep" %voiceHandler% %sleepMessage% & rundll32.exe powrprof.dll,SetSuspendState 0,1,0
IF "%~1"=="-test" %voiceHandler% %sleepMessage%
:: IF "%~1"=="-test" "C:\Code\playSound.vbs" "C:\Users\hbida\Music\Soundboard Shit\SFX\Wilhelm Scream.m4a"
SHIFT
GOTO parse
:endparse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment