We have written an application that sits in the tray controlling OpenVPN as an extension to a bigger application.
If you run openvpn.exe on command line, you can pre
StandardInput.Write(ConsoleKey.F4);
Obviously you have to get StandardIn for the process.
If I run OpenVPN as the following:
"openvpn.exe --config PathToMyConfig.ovpn --service MyEventName 0"
Then the following C# code causes OpenVPN to exit cleanly:
EventWaitHandle resetEvent = EventWaitHandle.OpenExisting("MyEventName");
resetEvent.Set();
Props to consultutah, his comments helped quite a bit.