SonarQube
  1. SonarQube
  2. SONAR-2794

Improve NT Service scripts to support UAC on Windows >= Vista / Server 2008

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Wrapper
    • Labels:
      None
    • Environment:
      Windows >= Vista
      Windows >= Server 2008

      with UAC enabled
    • Number of attachments :
      1

      Description

      Because of licensing issues, an old version of Tanuki's Java Wrapper Service is still in use.
      That old version does not support UAC, introduced in Windows Vista and Server 2008 properly.

      The install/uninstall/start/stop scripts in the bin folder for Windows (both 32 and 64 bits) are
      silently failing when UAC is enabled and when not ran as Administrator.

      Support for UAC must be added.

        Issue Links

          Activity

          Hide
          Dinesh Bolkensteyn added a comment - - edited

          1) Status of the fork of sonatype at: https://github.com/sonatype/jsw-binaries

          • Same status as we have. No commit since Dec 09, 2010.

          2) Nexus, same status as we have. No special mention about Windows in the documentation.

          (One thing: Their names are better, "Nexus.bat" instead of "StartSonar.bat" to start it in foreground)

          3) Latest version of the Java Wrapper Service

          • NT scripts are supported, but StartSonar.bat does not work anymore (it terminates immediatly), and wrapper.conf probably need changes.
          • Their DemoApp does not require admin rights (no UAC prompt), but the service scripts do (UAC prompt). A single binary seems to be used.
          Show
          Dinesh Bolkensteyn added a comment - - edited 1) Status of the fork of sonatype at: https://github.com/sonatype/jsw-binaries Same status as we have. No commit since Dec 09, 2010. 2) Nexus, same status as we have. No special mention about Windows in the documentation. http://www.sonatype.com/books/nexus-book/reference/install-sect-running.html http://www.sonatype.com/books/nexus-book/reference/ch03s06.html (One thing: Their names are better, "Nexus.bat" instead of "StartSonar.bat" to start it in foreground) 3) Latest version of the Java Wrapper Service NT scripts are supported, but StartSonar.bat does not work anymore (it terminates immediatly), and wrapper.conf probably need changes. Their DemoApp does not require admin rights (no UAC prompt), but the service scripts do (UAC prompt). A single binary seems to be used.
          Hide
          Evgeny Mandrikov added a comment -

          Dinesh, about item 3 : newer JSW has a support for UAC, which is not simply declaration in manifest as we did, but an API call, when admin privileges required

          Show
          Evgeny Mandrikov added a comment - Dinesh, about item 3 : newer JSW has a support for UAC, which is not simply declaration in manifest as we did, but an API call, when admin privileges required
          Hide
          Dinesh Bolkensteyn added a comment -
          Show
          Dinesh Bolkensteyn added a comment - Issue created at Sonatype, https://issues.sonatype.org/browse/NEXUS-4587
          Hide
          Evgeny Mandrikov added a comment -

          As was discussed with Dinesh one of the options - is to have two separated wrapper.exe : one usual as for now; and another one with manifest to work with services. So in attachment you'll find patched versions (32-bit and 64).

          Show
          Evgeny Mandrikov added a comment - As was discussed with Dinesh one of the options - is to have two separated wrapper.exe : one usual as for now; and another one with manifest to work with services. So in attachment you'll find patched versions (32-bit and 64).
          Hide
          Evgeny Mandrikov added a comment - - edited

          And option similar to previous is to use an elevate tool by replacing

          "%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
          

          on

          "%_REALPATH%elevate.exe" "%_WRAPPER_EXE%" -t %_WRAPPER_CONF%
          

          in all "*NTService.bat"

          Here is a list of found tools:

          Show
          Evgeny Mandrikov added a comment - - edited And option similar to previous is to use an elevate tool by replacing "%_WRAPPER_EXE%" -t %_WRAPPER_CONF% on "%_REALPATH%elevate.exe" "%_WRAPPER_EXE%" -t %_WRAPPER_CONF% in all "*NTService.bat" Here is a list of found tools: http://www.winability.com/elevate/ - license doesn't allow redistribution http://www.wintellect.com/cs/blogs/jrobbins/archive/2007/03/27/elevate-a-process-at-the-command-line-in-vista.aspx - dependency on .NET http://jpassing.com/2007/12/08/launch-elevated-processes-from-the-command-line/ - LGPL rework of a previous one to C, but contains a check of OS version, which prevents usage on Windows XP, however this check can be simply removed

            People

            • Assignee:
              Unassigned
              Reporter:
              Dinesh Bolkensteyn
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: