In case it is useful, I've just published ConnectOpenVPN, which is a similar tool (with C++ source) to my older ConnectVPN, to help connect via the OpenVPN client from things like TortoiseSVN and scripts.
It acts as a command-line wrapper around openvpn-gui.exe, addressing some problems the standard exe has with scripting. In particular, if you ask it to connect it will check if it is connected already and not do anything it nothing is needed (thus avoiding unwanted status windows appearing), and it properly waits for the connection to complete (instead detaching and running in parallel), while returning a success/fail code (so scripts can bail out on failures). Details are here, and the zip contains both binary and C++ source (can build with VS2017 and VS2019): https://www.pretentiousname.com/miscsoft/index.html#ConnectOpenVPN This does not replace the older ConnectVPN tool. The old tool works with the built-in Windows VPN while this new one works with the OpenVPN client. Since the old tool seemed useful to some TSVN users, I thought I'd share this new one in case it is as well. (On the same page, there's also a slightly newer version of ConnectVPN which includes a 64-bit build. Bitness *shouldn't* matter, but Windows 10 1809 introduced a strange bug where using the 32-bit client on 64-bit Windows connected to the VPN while forcing it as the default gateway. I'm not sure if Microsoft fixed that but it was a huge problem for me a few months ago.) The TSVN project (and anyone else) is welcome to include or fork the tool, or use the source code, or indeed ignore it entirely, as you wish. :) All the best, Leo On Wednesday, 7 July 2010 15:39:42 UTC+2, Leo Davidson wrote: > > Hi everyone, > > Just want to share a small thing I made for people using Tortoise SVN > (and similar tools) over VPNs (virtual private networks). (It'll also > help with RAS dial-ups, I think.) > > It's just a command-line exe that checks if a VPN is connected and, if > not, tells Windows to connect to it and waits for that to finish. > > If you access SVN over a VPN it can be a pain to manually connect > first (especially if the VPN disconnects due to inactivity and you're > never sure if it's still connected). > > I couldn't find a good one existing solution so I wrote my own. (I > found was RasDial.exe but that prompts via the command-line and asks > for the VPN password even if you're already connected.) > > After testing (on Windows 7 x64, FWIW) for a few weeks it seems to > work well. The binary and C++ source are here: > > http://www.pretentiousname.com/miscsoft/index.html#ConnectVPN > > To use it with Tortoise SVN, first create a .bat file that runs the > tool with the name of your VPN (the connection name in the network > control panel). Then tell Tortoise to run the .bat file as part of its > pre_commit_hook and pre_update_hook. (Set both to wait=true and > show/hide=hide.) > > (A .bat file is used because AFAIK you can't specify arbitrary > command-line arguments for hooks in the Tortoise SVN.) > > When you commit or update: > > - If you're not on the VPN, you'll see the standard Windows VPN/RAS > connection user interface (password prompt, progress windows, etc.). > Once connected the commit/update will continue as normal. > > - If you're already connected then nothing extra will happen and > you'll commit/update as normal. > > Limitation: > > - AFAIK, Tortoise SVN only has hooks for commit and update so there's > no way to run the tool before other events (e.g. log or blame). I've > not found that to be a big deal but it'll depend how you typically use > SVN. > > It's a very simple tool but I hope other people find it useful. > > Leo > > ------------------------------------------------------ > > http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2630515 > > To unsubscribe from this discussion, e-mail: [ > [email protected]]. > > -- You received this message because you are subscribed to the Google Groups "TortoiseSVN" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/aa155ed4-8d65-4fb4-8e71-83d905ccae14%40googlegroups.com.
