openvpn-build icon indicating copy to clipboard operation
openvpn-build copied to clipboard

Value of exe_path in registry not updated during reinstall

Open mattock opened this issue 8 years ago • 5 comments

If OpenVPN is reinstalled to a different path, the base directory for OpenVPN in the registry changes, but value for exe_path does not. This means that OpenVPNService is unable to find openvpn.exe when it tries to launch OpenVPN connections, which is evident from the Application EventLog. The problem can be reproduced with both interactive and silent (/S) installs using the official OpenVPN 2.4_beta1 installers.

A full "uninstall" then "install" procedure works around this problem, as the "HKLM:\SOFTWARE\OpenVPN" key is removed entirely during uninstall.

mattock avatar Nov 21 '16 15:11 mattock

should we fail during reinstall ? and suggest to remove another installed openvpn fisrt ?

chipitsine avatar Nov 21 '16 17:11 chipitsine

I think we could simply rewrite the registry values as necessary.

mattock avatar Nov 22 '16 06:11 mattock

it might lead to undetermined situation.

  1. installer "A" is installed to c:\openvpn1
  2. installer "B" is installed to C:\Program Files (registry changed)
  3. uninstalled "B" (registry removed)
  4. installer "A" is somewhat broken

I would like to keep it simple and predictable, it is quite complicated already

chipitsine avatar Nov 22 '16 09:11 chipitsine

I think we only need make sure the last installed version works, so if the following is avoided, we are ok:

Install A --> Install B --> uninstall A --> B is broken (can this happen?)

Refusing to install only if the current installed path in registry mismatches with the new choice is probably an acceptable way out. And always rewrite registry.

selvanair avatar Nov 22 '16 15:11 selvanair

The only way to truly manage multiple simultaneous installations would be to have separate sets of registry keys for each, and to be able to point OpenVPNService and OpenVPN-GUI to the correct registry key. I think this adds too much complexity for such a rare(?) use-case.

I think @selvanair 's suggestion makes sense.

mattock avatar Nov 23 '16 12:11 mattock

NSIS installer is not supported anymore. Closing issues.

flichtenheld avatar Jan 20 '23 12:01 flichtenheld