KeyRoutines
ConditionFreecond.network.vpn

Check if a VPN is connected on Windows from a routine

VPN connected is true while a VPN connection is up. Leave the name empty for any VPN, or type part of a connection's name to look for one in particular.

How it works

  • By default any VPN counts; the advanced name filter matches a connection whose name contains your text.
  • VPNs are recognised by the kind of network adapter they use or by a typical VPN app's adapter name.
  • Inside Wait until it wakes on network changes.

Routines that use it

Work apps only on VPN

When your work-start Hotkey runs, If the Work VPN is connected, open your work apps; otherwise Show banner reminds you to connect.

Wait for the tunnel

Wait until a WireGuard VPN is connected before Open URLs loads your company dashboard.

Private downloads

Before a download routine continues, check the VPN is on and stop the routine if it isn't.

Good to know

  • Detection is based on the network adapter, so an unusual VPN app may not be recognised.

Questions

Can I check which VPN is connected?
You can check for one by name. Type part of the connection's name, like Work or WireGuard, in the advanced name filter.
Does it work with any VPN app?
It looks for the network adapters VPN apps create, which covers most of them. A VPN that doesn't look like one to Windows may be missed.

Pairs well with

Build this routine in KeyRoutines

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