Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Error during Uninstallation and installation Process
Forum Updated to NodeBB v4.3 + New Features

Error during Uninstallation and installation Process

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user2301
    wrote on last edited by
    #1

    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. How to execute the stop and remove commands when uninstalling my windows service from the QT installer? Is there anything similar to installscript.qs such as uninstallscript.qs to stop and remove the windows service?

    I tried with below installscript.qs but did not work.

    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");
        }
    }
    
    RatzzR 1 Reply Last reply
    0
    • U user2301

      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. How to execute the stop and remove commands when uninstalling my windows service from the QT installer? Is there anything similar to installscript.qs such as uninstallscript.qs to stop and remove the windows service?

      I tried with below installscript.qs but did not work.

      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");
          }
      }
      
      RatzzR Offline
      RatzzR Offline
      Ratzz
      wrote on last edited by Ratzz
      #2

      @user2301 said in Error during Uninstallation and installation Process:

      The install is working only if the windows service is not already installed

      U can choose different target path for installation (Just for testing).
      QTIFW does for already installed path https://bugreports.qt.io/browse/QTIFW-482

      otherwise I will get the error from within the QT installer.

      What error you are getting??

      I uninstall the windows service just by removing my windows service TargetDir directory

      You should use MaintenanceTool.exe for clean uninstall . Its present in target directory of your installed application.

      --Alles ist gut.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved