Setting up rules in win10- making VPN open with certain programs

  1. legoman195's Avatar
    Posts : 3
    windows 10 pro 64-bit
       #1

    Setting up rules in win10- making VPN open with certain programs


    I want windows to open my VPN every time certain programs open.

    I have set up shortcut conditions through creating batch files

    as per "fig 1 - BitComet open with VPN"

    This works great but only when I trigger the shortcut.

    My problem is that in a lot of situations - use of torrents/newsgroups these programs are triggered via Chrome.

    Is there a way to latch on to the command to open these programs in any way to force my VPN to come on?

    I don't want to run my VPN all the time but I would like there to be an automated way that it opens for certain programs.

    Thanks in advance.
    Attached Thumbnails Attached Thumbnails Setting up rules in win10- making VPN open with certain programs-fig-1-bitcomet-open-vpn.png  
      My Computer

  2. dalchina's Avatar
    Posts : 30,338
    Win 10 Pro (1903)
       #2

    Hi, with Autohotkey (free scripting language), you could quite easily create a continuous loop in which you could test for the presence of a particular process, and if present, and the VPN is not running, launch your VPN.

    (However, that may not be an appropriate order of events- it could be required that the VPN is launched before the program- you'd have to check).


    Within the loop you'd also need to do something to close the VPN if none of the relevant processes were running.

    Note: Autohotkey has a very extensive and professional help file, and helpful forum.

    You can gain familiarity with Autohotkey starting with a single line of text in a script and running that.

    Note too that starting the VPN is likely to require more than launching a process- probably needs to be turned on or the country selected, for example.

    How this is done depends on the program. Possibilites:
    - command line parameters
    - point and click. Note that Autohotkey can also manipulate existing windows, move and click the mouse etc.
      My Computers

  3. legoman195's Avatar
    Posts : 3
    windows 10 pro 64-bit
    Thread Starter
       #3

    dalchina said:
    Hi, with Autohotkey (free scripting language), you could quite easily create a continuous loop in which you could test for the presence of a particular process, and if present, and the VPN is not running, launch your VPN.

    (However, that may not be an appropriate order of events- it could be required that the VPN is launched before the program- you'd have to check).


    Within the loop you'd also need to do something to close the VPN if none of the relevant processes were running.

    Note: Autohotkey has a very extensive and professional help file, and helpful forum.

    You can gain familiarity with Autohotkey starting with a single line of text in a script and running that.

    Note too that starting the VPN is likely to require more than launching a process- probably needs to be turned on or the country selected, for example.

    How this is done depends on the program. Possibilites:
    - command line parameters
    - point and click. Note that Autohotkey can also manipulate existing windows, move and click the mouse etc.
    I will have a play with the AutoHotkey. Thank you very much,

    Some points you have raised I have thought through.

    "Note too that starting the VPN is likely to require more than launching a process- probably needs to be turned on or the country selected, for example."

    I have my VPN set up so no input is required

    "Within the loop you'd also need to do something to close the VPN if none of the relevant processes were running."

    I have no issues with the VPN running after the program is finished.

    Thank you - I will start to see if I can make any progress.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:53.
Find Us




Windows 10 Forums