Uploaded image for project: 'Qt Installer Framework'
  1. Qt Installer Framework
  2. QTIFW-1169

Error during Uninstallation and installation Process - windows service application

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • None
    • General
    • None
    • Windows

      I am trying to install windows service application via qt installer. The install is working only if the windows service is not already installed and not already running in the system – otherwise I will get the error from within the QT installer, when I uninstall the windows service just by removing my windows service TargetDir directory but without stopping and removing my windows service from the list of windows services. 

      I tried with below installscript.qs and controlScript.qs to execute the stop and remove commands when uninstalling my windows service from the QT installer? but did not work.

      How to stop and remove the windows service while uninstalling from QT installer?

       

      function Component() 
      { }
      Component.prototype.createOperations = function() { 
      component.createOperations();
      if (systemInfo.productType === "windows") {
      if (component.isInstalled() || component.uninstallationRequested()) { component.addElevatedOperation("Execute", "@TargetDir@/platform/tools/Server/TestServer.exe", "stop"); 
      component.addElevatedOperation("Execute", "@TargetDir@/platform/tools/Server/TestServer.exe", "remove"); 
      } 
      component.addElevatedOperation("Execute", "@TargetDir@/platform/tools/Server/TestServer.exe", "install"); 
      component.addElevatedOperation("Execute", "@TargetDir@/platform/tools/Server/TestServer.exe", "start"); 
      } 
      }
      

       config/controlScript.qs

       

      function Controller()
      {
       installer.uninstallationStarted.connect(onUninstallationStarted);
      }
      onUninstallationStarted = function()
      {
      installer.performOperation("Execute", "@TargetDir@/platform/tools/Server/TestServer.exe", "stop");
      }
      

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            installerteam Installer Team
            user2301 user2301
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes