Skip to content

Instantly share code, notes, and snippets.

@Wtower
Created January 1, 2019 21:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wtower/ad08afb53c03944463579b25a1757f61 to your computer and use it in GitHub Desktop.
Save Wtower/ad08afb53c03944463579b25a1757f61 to your computer and use it in GitHub Desktop.
OpenVPN for Windows: Map network drives at connect

OpenVPN for Windows: Map network drives at connect

Create two batch files as below. They need to be in the same directory as the .ovpn OpenVPN configuration file (eg. \Users\Wtower\OpenVPN) and be named with the same name filename, but appending _up and _down.

net use X: /delete
net use X: \\192.168.0.0\sharename /user:username password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment