- This topic has 7 replies, 2 voices, and was last updated 4 days, 14 hours ago by
Vadim Smirnov.
-
AuthorPosts
-
April 16, 2026 at 7:53 am #14272
I tried setting up WireSock so that on startup it will be hidden in tray and autoconnect. And on closing the application it will disconnect the VPN.
Using AutoHotKey to start the application and autoconnect works great. But closing it will not work. Either I cannot close the application or I manage to close it but the VPN is still connected in the background.
Is there a way to do this without interacting with the application manually in the taskbar?
May 3, 2026 at 8:14 am #14285Could you please clarify what version of WSC do you use?
May 3, 2026 at 8:16 am #14286Version 3.4.6.1
May 4, 2026 at 1:03 pm #14287Have you enabled Disconnect VPN when app closes option? What options do you have enabled under Startup & Auto-Connect?
May 4, 2026 at 1:28 pm #14288Yes I have that enabled. But that only works when exiting the app correctly. If I right click the task bar icon and exit the app it disconnects correctly. But if I use AutoHotKey (same as Task manager force close) it will still be connected even if the application is gone from the taskbar.
i got start minimized to tray and connect on app launch enabled! And the disconnect on exit.
May 4, 2026 at 3:41 pm #14289This is expected behavior.
The VPN connection is managed by a background service that does not depend on the UI. On normal exit, the UI sends a disconnect command to the service before closing.
If the UI process is force-killed, for example via AutoHotKey or Task Manager, it cannot send that command, so the service keeps running and the VPN tunnel stays connected.
So disconnect on exit works for normal exits, but not when the UI is forcibly terminated.
May 6, 2026 at 3:53 pm #14290I understand why it works like it does. But is there any way for me to disconnect WireSock when closing the application with AutoHotKey?
I would love to have a keyboard shortcut from AutoHotKey which I can use to both exit the application and disconnect the VPN. Is it possible to do this somehow?I previously used your WireSock application that did not have any UI, I think that version was 3 years old, here it worked well together with AutoHotKey to run a CMD command to connect and disconnect. But I cannot work out how to do it with the new version and the old version is no where to be found any longer.
May 8, 2026 at 8:58 am #14291If AutoHotkey lets you run a command-line action when the app is closed, you can use the CLI utility to disconnect the tunnel.
-
AuthorPosts
- You must be logged in to reply to this topic.
