Author: markt
Date: Wed Nov 22 21:25:42 2017
New Revision: 1816083
URL: http://svn.apache.org/viewvc?rev=1816083&view=rev
Log:
Fix https://bz.apache.org/bugzilla/show_bug.cgi?id=51496
When using the Windows installer, check if the requested service name already
exists and, if it does, prompt the user to select an alternative service name.
Patch provided by Ralph Plawetzki.
Modified:
tomcat/trunk/res/tomcat.nsi
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/res/tomcat.nsi
URL:
http://svn.apache.org/viewvc/tomcat/trunk/res/tomcat.nsi?rev=1816083&r1=1816082&r2=1816083&view=diff
==============================================================================
--- tomcat/trunk/res/tomcat.nsi (original)
+++ tomcat/trunk/res/tomcat.nsi Wed Nov 22 21:25:42 2017
@@ -57,6 +57,7 @@ Var TomcatPortAjp
Var TomcatMenuEntriesEnable
Var TomcatShortcutAllUsers
Var TomcatServiceName
+Var TomcatServiceNameAlreadyInstalled
Var TomcatServiceDefaultName
Var TomcatServiceFileName
Var TomcatServiceManagerFileName
@@ -632,6 +633,15 @@ Function pageConfigurationLeave
Abort "Config not right"
Goto exit
${EndIf}
+
+ ReadRegStr $TomcatServiceNameAlreadyInstalled HKLM
"SYSTEM\CurrentControlSet\Services\$TomcatServiceName" \
+ "DisplayName"
+ ${If} $TomcatServiceNameAlreadyInstalled != ""
+ MessageBox MB_ICONEXCLAMATION|MB_OK 'A service with the given Service Name
is already installed on this machine. \
+ Please choose another Service Name'
+ Abort "Config not right"
+ Goto exit
+ ${EndIf}
Push $TomcatServiceName
Call validateServiceName
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1816083&r1=1816082&r2=1816083&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Wed Nov 22 21:25:42 2017
@@ -249,6 +249,12 @@
such attempted use of the endorsed directory mechanism will trigger an
error and Tomcat will fail to start. (rjung)
</fix>
+ <add>
+ <bug>51496</bug>: When using the Windows installer, check if the
+ requested service name already exists and, if it does, prompt the user
+ to select an alternative service name. Patch provided by Ralph
+ Plawetzki. (markt)
+ </add>
<fix>
<bug>61590</bug>: Enable <code>service.bat</code> to recognise when
<code>JAVA_HOME</code> is configured for a Java 9 JDK. (markt)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]