Autoconnect (and disconnect) from VPN?

For technical support visit http://support.2brightsparks.com/
Tyree
Newbie
Newbie
Posts: 9
Joined: Tue Aug 12, 2008 3:34 pm

Autoconnect (and disconnect) from VPN?

Postby Tyree » Sun Oct 09, 2016 3:45 pm

Is it possibly to have SyncBack automatically connect to a VPN, run a profile, and then disconnect from that VPN on Windows 10?

Thanks!

Conrad Chung
2BrightSparks Staff
2BrightSparks Staff
Posts: 588
Joined: Thu Dec 05, 2013 3:01 pm

Re: Autoconnect (and disconnect) from VPN?

Postby Conrad Chung » Mon Oct 10, 2016 1:44 am

See Modify profile > Expert > Programs - Before (and > After sub-setting page).

You can run either batch/script files or VPN executable via the Before settings. In addition, it's also possible to deliver 'Quit/End-task' commands via the After setting in the profile (assuming your VPN program allows disconnection commands via command-line switches or via batch/script files).

Additional settings are available in the Before/After settings page to run (or Abort) the profile under certain conditions (for example, Abort the profile if your VPN fails to execute, etc). Refer to the contextual Help for more details.

Note that we can't provide bespoke assistance in troubleshooting issues with VPN-related executable command-lines. Please refer to your VPN Help for details.

Tyree
Newbie
Newbie
Posts: 9
Joined: Tue Aug 12, 2008 3:34 pm

Re: Autoconnect (and disconnect) from VPN?

Postby Tyree » Mon Oct 10, 2016 12:55 pm

Ah gotcha. I thought it might have something to do with the before and after stuff. Have to research my VPN command line options.

Thanks!

henwin
Newbie
Newbie
Posts: 8
Joined: Wed Mar 25, 2009 12:13 pm

Re: Autoconnect (and disconnect) from VPN?

Postby henwin » Sun Sep 10, 2017 3:49 pm

I was able to set up 2 batch files that enable me to be logged in or disconnected from my VPN. I found the necessary command structure online.

It's actually pretty easy to do. First, set up your VPN in Windows 10 and make sure it works.

Then create 2 batch files, using Notepad or some other pure text editor, and put them in a folder on your storage device. (ONLY use a text editor. Most other word processing software won't create the proper text-only file and it won't run even with the .bat extension--or it'll run and give you an error message of some kind. #-o (I did not test this particular configuration, but I am relying on past experience.)

The LOG IN batch file looks like this:

@echo off
rasdial <VPN Name> <UserID> <Password>
exit

You need to fill in your VPN's name, your user ID and your password. Save the file with the file extension .bat . After testing your can rem out (or simply remove) the @echo off command.

The Disconnect file's contents are:

rasdial <VPN Name> /DISCONNECT
exit

Again, fill in your VPN's name in the <VPN Name> location. Save that file with a .bat file extension, too.

Then test them. You will more than likely find they work great, unless you didn't fill in the data correctly. Then use them where needed or call them from within Task Scheduler.


Return to “SyncBackPro (commercial)”



Who is online

Users browsing this forum: No registered users and 7 guests