appman999
I have been successfully using the Windows OpenVPN-GUI client to connect to my Raspberry VPN server for some years.
It automatically starts on booting Windows and connects to my server. I also have commercial servers imported to which I can then connect for different uses.
However I now no longer want to connect to the Raspberry but instead connect by default to one of the commercial servers but I don't seem to be able to get OpenVPN-GUI to forget my Raspberry server.
I uninstalled OpenVPN-GUI and made sure the two Openvpn folders (one in programs and one in user) were deleted. I then reinstalled it importing just the commercial.ovpn file but when rebooting it get the error message 'Cannot find requested config to autostart: Raspberry.ovpn. If I then restart OpenVPN-GUI I can connect to commercial.ovpn.
As it is a fresh install I don't know why it is looking for Raspberry.ovpn? I have searched through the registry looking for a broken link, looked in Task Scheduler in case I had set one up and forgotten, and used services.msc to make sure there wasn't something there, but all to no avail.
Can anyone help advise where a reference to a defunct OpenVPN server could be lurking and not removed by a fresh installation.
TinCanTech
Try sysinternals autoruns
appman999
Thanks for that, it was a quicker way of searching than mine but unfortunately still didn't turn up any references to the old ovpn reference.
TinCanTech
appman999
Thanks again but I've no problem with the installation or usage, it just appears that the autostart ovpn that I have been using is stored somewhere else in Windows and despite reinstalling OpenVPN-GUI it still looks for it even though I don't use it anymore.
As I said originally I have searched through the registry and the default folders but there is nothing there.
Do you know anywhere else it stores settings?
TinCanTech
You broke it .. I have no idea.
appman999
For any others who come across this problem (of a phantom ovpn file link) I have removed the error by running the following commands in terminal to flush out the dns caches (thanks to Matthew Adams on Windowsreport).
netsh interface ip delete arpcache
ipconfig /flushdns
ipconfig /renew
Now I just have to set up OpenVPN-GUI to autosatrt and autoconnect to my new commercial.ovpn
appman999
While setting my OpenVPN to autostart and autoconnect I found a link to the old Raspberry.ovpn in %ProgramData%\Microsoft\Windows\Start Menu\Programs\Startup. I thought I had looked here before but obviously not.
notAnElephant
The solution to my similar problem was replacing the config file's absolute path with a relative one:
So I went from this:
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --connect "C:\Program Files\OpenVPN\config\myconfig.ovpn"
to this:
"C:\Program Files\OpenVPN\bin\openvpn-gui.exe" --connect myconfig.ovpn --silent_connection 1
Also, make sure that (in my case) "C:\Program Files\OpenVPN\config" is the configuration files folder (settings->advanced->configuration files folder)