KeyRoutines
TriggerFreetrigger.app.quit

Run a routine when an app or game closes on Windows 11

App quit starts a routine when a chosen app or game has fully closed. It's the natural partner of App launched for putting things back the way they were.

How it works

  • Pick the app or game to watch.
  • It fires when the last process of that app ends, so closing one window of a multi-window app doesn't set it off.
  • Ordinary apps are watched by waiting on their process; protected games are tracked through the process list without opening anything.
  • The routine receives which app quit and when.

Routines that use it

Back to normal after gaming

When the game quits, Set power plan returns to Balanced, Set default audio device switches to speakers and Restore layout puts your windows back.

Close the companions

When your video editor quits, Close app ends the helper tools you only opened alongside it.

Back up after work

When your writing app closes, Zip files packs your project folder and Show banner confirms it's done.

Settings

SettingWhat it does
AppThe app or game to watch.

Good to know

  • Web links can't be watched; pick an installed app or game instead.

Questions

Can I run something when a program closes on Windows?
Yes. Use App quit as the trigger and add whatever steps you need, such as switching the audio device or the power plan. It runs each time the app fully closes.
What if the app just minimizes to the tray?
Then it hasn't quit, because its process is still running. App quit only fires when the app's last process actually ends.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.