Prevent direct invocation of the Windows uninstaller without a service name from...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Aug 2011 09:22:24 +0000 (09:22 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 2 Aug 2011 09:22:24 +0000 (09:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1153075 13f79535-47bb-0310-9956-ffa450edef68

res/tomcat.nsi
webapps/docs/changelog.xml

index a9a80db..550d0ab 100644 (file)
@@ -1085,6 +1085,14 @@ FunctionEnd
 
 Section Uninstall
 
+  ${If} $TomcatServiceName == ""
+    MessageBox MB_ICONSTOP|MB_OK \
+        "No service name specified to uninstall. This will be provided automatically if you uninstall via \
+         Add/Remove Programs or the shortcut on the Start menu. Alternatively, call the installer from \
+         the command line with -serviceName=$\"<name of service>$\"."
+    Quit
+  ${EndIf}
+  
   Delete "$INSTDIR\Uninstall.exe"
 
   ; Stop Tomcat service monitor if running
index 143cd95..d6f60b0 100644 (file)
         Correctly handle uninstall with the Windows installer of the service is
         installed with a name that contains a &apos;-&apos; character. (markt)
       </fix>
+      <fix>
+        <bug>51598</bug>: Prevent direct invocation of the Windows uninstaller
+        without a service name from executing since the uninstall will not be
+        complete. (markt)
+      </fix>
     </changelog>
   </subsection>
 </section>