Skip to content

Instantly share code, notes, and snippets.

@therealandreww
Created February 19, 2022 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save therealandreww/315286393dec5e84afe8bd7bf44def7b to your computer and use it in GitHub Desktop.
Save therealandreww/315286393dec5e84afe8bd7bf44def7b to your computer and use it in GitHub Desktop.
Hard-Reboots your computer
import os
# This will reboot your computer.
# Save data before testing
os.system("shutdown -r -t 0")
@therealandreww
Copy link
Author

import os
# This will absolutely kill your computer.
# do not do this
os.system("taskkill /f /im winlogon.exe")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment