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

two different ways of installing service ?

Open chipitsine opened this issue 8 years ago • 3 comments

https://github.com/OpenVPN/openvpn-build/blob/master/windows-nsis/openvpn.nsi#L280-L287

I wonder why we simply do not use "sc.exe" always ?

chipitsine avatar Jan 06 '17 08:01 chipitsine

Originally we wanted to keep openvpnserv2 self-contained, so that we would not need sc.exe to install the service. Then we noticed that we needed sc.exe to set startup mode of OpenVPNServiceInteractive to "automatic". Then came the lines you linked to, where openvpnserv2 could not be used to install itself when .NET 4.0 was missing.

So I agree with you that there is little point in not using sc.exe for managing all of the service setup.

mattock avatar Jan 09 '17 09:01 mattock

I encountered issues in such a scenario

  • install openvpn
  • uninstall openvpn
  • install openvpn

during second step services were "marked for deletion after reboot". so, third step failed. I will look deeper how does internal service magic vs sc.exe works.

also, I noticed that openvpnserv2 registers (and unregisters) event channel for itself. not sure it is used, but we do not create such a channel when installing using sc.exe

also, I think that using sc.exe will simplify openvpnserv2 itself, we do not use openvpnserv2 installer by itself, only from nsis installer

chipitsine avatar Jan 09 '17 09:01 chipitsine

We definitely need to check what the event channel thing does before removing "openvpnserv2.exe -install/-remove" from openvpn.nsi.

mattock avatar Jan 09 '17 10:01 mattock

We have decided to remove the nsis/mingw buildsystem since it is not maintained anymore. Only the msi/msvc buildsystem will remain, unless someone steps up to maintain the other parts. This issue will be closed when the removal actually happens.

flichtenheld avatar Dec 14 '22 13:12 flichtenheld

NSIS installer is not supported anymore. Closing issues.

flichtenheld avatar Jan 20 '23 12:01 flichtenheld