?
Solved

Script Writing - create a VPN connection in windows

Posted on 2011-02-11
2
Medium Priority
?
1,724 Views
Last Modified: 2012-05-11
Not sure if this is possible, or if parts are possible, but I want to deploy a VPN connection to my end users, some XP some 7.  i want to make thsi as easy as possible for them.  Here's the things I'd love to be able to do:
1. Have a script that creates a VPN connection to a specified address and then dumps a shortcut on their desktop
2. If possible have the script change the icon from the normal VPN icon to the RDP icon
3. If possible, force the VPN client to launch RDP

I'm not sure if any of this is possible, but if it is, that would be awesome!
0
Comment
Question by:JamesonJendreas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
Jody Lemoine earned 1000 total points
ID: 34891051
Have a look at the Microsoft Connection Manager Administration Kit (CMAK) for this sort of thing.

http://technet.microsoft.com/en-us/library/dd672646(WS.10).aspx

It allows you to easily create custom VPN profiles with scripted components and the like.  I don't know if it will necessarily do *everything* you're looking for, but it should cover most of it.
0
 
LVL 70

Assisted Solution

by:Qlemo
Qlemo earned 1000 total points
ID: 34892564
You can script the VPN itself instead of installing anything. What you need is a general .pbk file (Phonebook) describing the type of connection (e.g. PPTP) with a general or specific connection name (I use msvpn for that). You can create that on any PC, and just copy it as your template.

Connecting will then be consist of a batch file:
@echo off
rasdial «msvpn» «User» «Password» /domain:«Domain» /phone:«IP-Address» /phonebook:«Path and Name of the PBK file»
start /wait mstsc /v:«IP-Address to RDP to»
rasdial /D «msvpn»

Open in new window

All parts in «» are to be replaced by your own choice. That code should start VPN, kick on RDP, and as soon as RDP terminates close the VPN connection.
0

Featured Post

Bringing Advanced Authentication to the SMB Market

WatchGuard announces the acquisition of advanced authentication provider, Datablink, with one mission – to bring secure authentication to SMB, mid-market, and distributed enterprises with a cloud-based solution, ideal for resale via their established channel & MSSP community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let’s list some of the technologies that enable smooth teleworking. 
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question