Skip to content

adwirth/PreventWakeUp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”§ Disable Wake Timers on Windows (10 & 11)

This repository provides a secure and robust method to disable all wake-up triggers that can cause your Windows machine to wake from sleep or hibernation unexpectedly β€” particularly during the night.

The solution works reliably on both Windows 10 and Windows 11, using a combination of PowerShell automation and optional persistent configuration via Task Scheduler.


βš™οΈ Features

  • βœ… Disables all WakeToRun tasks (where permitted)
  • βœ… Disables wake-enabled devices (e.g., mouse, NIC, USB hubs)
  • βœ… Disables system wake timers in the active power plan
  • βœ… Compatible with both Windows 10 and Windows 11
  • βœ… Optionally installs a scheduled task to re-apply the fix at boot
  • βœ… Uses NanaRun/mINsUDO.exe to gain TrustedInstaller privileges when necessary

πŸ“¦ Contents

File Description
disable_wakeup_2.ps1 The core PowerShell script that performs all actions (safe, non-destructive)
install_scheduled_task.ps1 Installs a persistent fix as a SYSTEM-level scheduled task
run_disable_wakeup_TI.bat Entry point to run the fix manually or install the scheduled task, auto-elevated via mINsUDO.exe
mINsUDO.exe ⚠️ Not included β€” must be downloaded separately to enable TrustedInstaller context

πŸ“₯ Dependencies

Required:

  • PowerShell 5.1+ (default on Windows 10 and 11)
  • mINsUDO.exe (download manually)

πŸ”— Download mINsUDO.exe from:
https://github.com/M2Team/NanaRun/releases

Place mINsUDO.exe in the same folder as the other scripts.


πŸš€ Usage

πŸ”Ή One-Time Execution (disable wake triggers now)

  1. Download or clone this repo
  2. Place mINsUDO.exe in the same folder
  3. Run run_disable_wakeup_TI.bat
  4. Select option [1] to disable wake timers now

The script logs output to a .log file and opens it in Notepad at the end.


πŸ”Έ Persistent Setup (apply fix at every boot)

  1. Follow steps 1–3 above
  2. Select option [2] to install the scheduled task

This creates a task named DisableWakeTimersOnBoot, running as SYSTEM at every startup. It re-applies all protections automatically.

βœ… To uninstall:

Unregister-ScheduledTask -TaskName "DisableWakeTimersOnBoot" -Confirm:$false

πŸ›‘ Security and Stability Notes

  • The script does not modify ACLs or deny permissions β€” unlike some older methods that use icacls to block UpdateOrchestrator tasks (which can break update processes).
  • Using mINsUDO.exe -TI ensures the script runs with TrustedInstaller privileges, needed to disable some protected tasks.
  • The script skips tasks or devices it cannot modify and logs all actions, including failures.

πŸ““ License

MIT License. Use at your own risk.

About

Disable Windows wake timers to prevent unwanted wake-ups from sleep

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published