Is it possible to establish a VPN connection programmatically?

Is it possible to establish a VPN connection programmatically?

I want to establish a VPN connection programmatically (when I run my VB.NET application, the app will create a VPN without the needing the user -runs win2k- establishes the connection). Is it possible to do it programmatically and how or the only way to do it is manually?

    Requires Free Membership to View

    By submitting your registration information to SearchNetworking.com you agree to receive email communications from TechTarget and TechTarget partners. We encourage you to read our Privacy Policy which contains important disclosures about how we collect and use your registration and other information. If you reside outside of the United States, by submitting this registration information you consent to having your personal data transferred to and processed in the United States. Your use of SearchNetworking.com is governed by our Terms of Use. You may contact us at webmaster@TechTarget.com.

Microsoft provides a command-line tool that you can invoke from your application to set up IPsec policy. From the Microsoft website:
"Ipsecpol.exe: Internet Protocol Security Policies Tool
 Posted: July 13, 2001
 * *
 *
 Download
 Download Fileipsecpol_setup.exe
 147 KB file
 1 min @ 28.8 Kbps
 
 Related Links
 Buy the Windows 2000 Server Resource Kit.
 Buy the Windows 2000 Professional Resource Kit.
 
 *
 * *

This command-line tool configures Internet Protocol Security (IPSec) policies in the Directory Service, or in a local or remote registry. It does everything that the IPSec Microsoft Management Console (MMC) snap-in does, and is even modeled after the snap-in. IPSecPol has two mutually exclusive modes: dynamic and static. The default mode is dynamic. This tool runs only on Microsoft Windows 2000."

There is an equivalent tool (ipseccmd) for Windows XP.

This was first published in January 2004