KeyRoutines
ConditionFreecond.session.unlocked

Only run a routine when the PC is unlocked on Windows 11

PC is unlocked is true while you're signed in and the lock screen isn't showing. Put it in front of anything that needs you at the PC, like sounds, prompts or keystrokes.

How it works

  • It has no settings: it is simply true while the PC is unlocked.
  • It follows Windows' lock and unlock events, so a Wait until continues the moment you unlock.
  • Use it to guard steps on a schedule that would be pointless or unwanted while the PC is locked.

Routines that use it

Reminders only when you're there

An Every hour routine runs Show banner "Stretch" only if the PC is unlocked.

Finish after unlocking

A scheduled report routine does its file work, then Wait until the PC is unlocked before Open file or folder shows the result.

No typing into the lock screen

A routine checks PC is unlocked before Type text fills in your daily standup notes.

Questions

Do routines run while my PC is locked?
Triggers such as schedules can still start routines while the PC is locked. Add PC is unlocked as a check when a step only makes sense with you at the screen.
How do I run something right after I unlock my PC?
Use the PC unlocked trigger for that. This condition is for checking the state inside a routine that started some other way.

Pairs well with

Build this routine in KeyRoutines

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