#739 closed Bug / Defect (fixed)

Make installation of openvpnserv2 look less scary

Reported by: samuli Owned by: samuli
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)

redirect-test.nsi (744 bytes) - added by samuli 14 months ago.
Example NSIS script that hide sc.exe output, but warns the user on failure

Download all attachments as: .zip

Change History (5)

Changed 14 months ago by samuli

Example NSIS script that hide sc.exe output, but warns the user on failure

comment:1 Changed 14 months ago by samuli

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 14 months ago by samuli

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.

Last edited 14 months ago by samuli (previous) (diff)

comment:3 Changed 14 months ago by samuli

The PR has been merged, closing.

comment:4 Changed 14 months ago by samuli

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.