Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Reconnect to VPN - C#

Compare Page Revisions



« Older Revision - Back to Page History - Current Revision


Page Revision: Tue, Apr 14, 2020, 7:13 AM


Overview

This article provides a means to connect to a VPN connection from C#

References

https://www.tenforums.com/tutorials/90313-connect-vpn-windows-10-a.html#option3

Code

var psi = new ProcessStartInfo
{
    Arguments = "\"My VPN Connection\"",
    FileName = @"c:\windows\system32\rasdial.exe",
    WindowStyle = ProcessWindowStyle.Normal,
    UseShellExecute = true
};

Process.Start(psi).WaitForExit();                  

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.