#739 closed Bug / Defect ( fixed )
Make installation of openvpnserv2 look less scary
| Reported by: | Samuli Seppänen | Owned by: | Samuli Seppänen |
|---|---|---|---|
| Priority: | major | Milestone: | beta 2.4 |
| Component: | Installation | Version: | OpenVPN git master branch (Community Ed) |
| Severity: | Not set (select this one, unless your'e a OpenVPN developer) | Keywords: | windows |
| Cc: |
Description
Right now successful installation of openvpnserv2 produces lots of output that can look like an error, but it is in fact just too verbose.
Attachments (1)
Change History (6)
Changed 8 years ago by
| Attachment: | redirect-test.nsi added |
|---|
comment:1 Changed 8 years ago by
There is no really clean way to hide command output in NSIS when using nsExec::<something>, because that function does not support I/O redirection. Running the command from within
cmd.exe
does the trick, though. It seems that sc.exe pushes everything into STDOUT even when there is a failure, so
>nul
silences sc.exe nicely. When OpenVPNServiceInteractive is not running, the "sc.exe start OpenVPNServiceInteractive" command will return 0, and when the service is (already) running, sc.exe returns 1056. The return value can be used to produce a less-verbose but still information message to the log view, as is done in the attached redirect-test.nsi script.
I will merge this functionality into openvpn.nsi and build new 2.4-alpha1 preview installers.
comment:2 Changed 8 years ago by
A pull request that does this:
I'll merge it with lazy-ACK soon if there are no comments. I manually applied the patch to openvpn-build used to build openvpn-2.4_alpha1 installers.
comment:4 Changed 8 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Example NSIS script that hide sc.exe output, but warns the user on failure