So I need to programmatically start TunnelBear.exe (a VPN) in C#, and then kill it again. The command for this in cmd is (after going to the directory) TunnelBear.exe --on
This is what I tried in C#:
var process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = @"C:Program Files (x86)TunnelBearTunnelBear.exe",
Arguments = @"TunnelBear.exe --on",
UseShellExecute = false,
CreateNoWindow = true,
RedirectStandardOutput = true,
RedirectStandardInput = true
}
};
process.Start();
New contributor
OFNEILL is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.