Page 1 of 1

How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come up?

Posted: Sun Aug 23, 2020 6:28 am
by batchonly
How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come up?

I have been using the openvpn.exe daemon without the GUI for many years where I used to turn UAC completely off but that's overkill.
(1) I install just the "OpenVPN Service" (nothing else), which gives me the openvpn.exe daemon.
(2) I tell Windows to open all *.ovpn files using that openvpn.exe daemon by default
(3) The openvpn.exe daemon properties are set to "Run this program as an administrator"

Number (2) above allows me to doubleclick on any arbitrary *.ovpn file and number (3) above allows openvpn to set the route with admin privileges.
All this works fine as long as I completely turn off Windows User Account Control, but that's just overkill (and unsafe).

I can set up a Windows task to "run with highest privileges", which turns off UAC consent popups for any specific openvpn.exe-and-ovpn-config-file combination, but that's also overkill since I could have dozens or scores of openvpn config files at my descretion.

I don't want to set up a Windows task to "run with highest privileges" for every specific conceivable combination of openvpn.exe-and-config files.
I just want to doubleclick on an openvpn *.ovpn config file and have it open in the OpenVPN daemon WITHOUT the UAC consent popup.

I can't be the only person on the planet who wants this, the SIMPLEST possible OpenVPN setup one can imagine (you just doubleclick on the ovpn file and it just works), which is why I ask the basic setup question:

How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come up?
--
Windows 10 Pro build 1904, OpenVPN-2.5-beta1-amd64

Re: How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come

Posted: Wed Aug 26, 2020 12:15 pm
by 300000
you can phone paid to microsoft helpline so they can help you , that is how windows works not openvpn , nothing to do with openvpn at all.

Re: How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come

Posted: Thu Aug 27, 2020 4:52 am
by batchonly
300000 wrote:
Wed Aug 26, 2020 12:15 pm
you can phone paid to microsoft helpline so they can help you , that is how windows works not openvpn , nothing to do with openvpn at all.
While I agree that installing and running the OpenVPN daemon has "nothing to do with openvpn at all", I was hoping someone has solved this very common problem via either an option to the openvpn.exe daemon perhaps, or some other option so that the route command executed by openvpn would succeed without the need to run as administrator.

The problem boils down to how the openvpn daemon sets the route, as shown in this "good" log and "bad" log:

Good log:

Code: Select all

2020-08-23 15:03:14 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
2020-08-23 15:03:14 C:\Windows\system32\route.exe ADD xxx.xxx.xxx.xxx MASK 255.255.255.255 192.168.0.1
2020-08-23 15:03:14 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=35 and dwForwardType=4
2020-08-23 15:03:14 Route addition via IPAPI succeeded [adaptive]
2020-08-23 15:03:14 C:\Windows\system32\route.exe ADD 0.0.0.0 MASK 128.0.0.0 yyy.yyy.yyy.yyy
2020-08-23 15:03:14 ROUTE: CreateIpForwardEntry succeeded with dwForwardMetric1=25 and dwForwardType=4
2020-08-23 15:03:14 Route addition via IPAPI succeeded [adaptive]
Bad log:

Code: Select all

2020-08-23 15:05:57 TEST ROUTES: 1/1 succeeded len=0 ret=1 a=0 u/d=up
2020-08-23 15:05:57 C:\Windows\system32\route.exe ADD xxx.xxx.xxx.xxx MASK 255.255.255.255 192.168.0.1
2020-08-23 15:05:57 ROUTE: route addition failed using CreateIpForwardEntry: Access is denied.   [status=5 if_index=5]
2020-08-23 15:05:57 Route addition via IPAPI failed [adaptive]
2020-08-23 15:05:57 Route addition fallback to route.exe
2020-08-23 15:05:57 env_block: add PATH=C:\Windows\System32;C:\Windows;C:\Windows\System32\Wbem
2020-08-23 15:05:57 ERROR: Windows route add command failed [adaptive]: returned error code 1

Re: How do I doubleclick on any arbitrary *.ovpn file & have WIndows 10 UAC user account control consent popups NOT come

Posted: Thu Aug 27, 2020 10:18 am
by TinCanTech
batchonly wrote:
Thu Aug 27, 2020 4:52 am
I was hoping someone has solved this very common problem
It is not a common problem. That is the Way it is.

If you do find a solution then you should report your findings to Microsoft and claim a bug-bounty.