I just finished writing a script with PowerShell and I need it to run every time my system wakes up from sleep or Hibernation. I tried the gpedit.msc -> User Config -> Windows Settings -> Scripts -> Logon but this does not work when my system Wakes up from 'Sleep'... probably because 'Sleep' - > 'Wake -up' is not technically new logon (As a user I am already logged-on).
Either a Sleep-Wake event or Login (User Login) event should trigger my script.
Any ideas on how I can do this?
More Info on what my script does: It checks if internet/network is connected. If yes, it will attempt to run the Cisco VPN connection command line utility with required arguments and logs me into VPN. Every time I wake my system up from sleep and login I need the damn VPN to connect me automatically.