openvpn-build
openvpn-build copied to clipboard
two different ways of installing service ?
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 ?
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.
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
We definitely need to check what the event channel thing does before removing "openvpnserv2.exe -install/-remove" from openvpn.nsi.
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.
NSIS installer is not supported anymore. Closing issues.