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. How to launch my software when the installation is finished? (Qt Installer Framework)

How to launch my software when the installation is finished? (Qt Installer Framework)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
6 Posts 4 Posters 5.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.
  • J Offline
    J Offline
    julia_f
    wrote on last edited by
    #1

    Hi All,

    I would like to execute my application after the installation for Windows throught Qt Framework Installer. My goal is to update my software when an update is available like that https://stackoverflow.com/questions/34318934/qt-installer-framework-auto-update .

    There are the steps :

    • Click on the shortcut and launch my software
    • Check if an update is available
    • If no update available, continue
    • If an update is available, call "maintenancetool --updater"
    • Quit my software
    • Install my update (Qt Installer Framework based)
    • At the end of my installation and the installation window is closed, I would like to launch my software???

    My question is : how to launch my software when the installation is finished??

    K 1 Reply Last reply
    1
    • J julia_f

      Hi All,

      I would like to execute my application after the installation for Windows throught Qt Framework Installer. My goal is to update my software when an update is available like that https://stackoverflow.com/questions/34318934/qt-installer-framework-auto-update .

      There are the steps :

      • Click on the shortcut and launch my software
      • Check if an update is available
      • If no update available, continue
      • If an update is available, call "maintenancetool --updater"
      • Quit my software
      • Install my update (Qt Installer Framework based)
      • At the end of my installation and the installation window is closed, I would like to launch my software???

      My question is : how to launch my software when the installation is finished??

      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      @julia_f

      Apparently, you are using already QProcess for the installer update check.

      You can simply use also QProcess and start your application again after update.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • J Offline
        J Offline
        julia_f
        wrote on last edited by
        #3

        @koahnig
        I would like that my software does a software update itself. I need to stop my software before to do a software update (with my installer) cuz in Windows, you cannot delete an executed program. And at this point, you must to launch the software in the installer script.

        I would like to know how to do that in the installer script (not in my software/c++)

        CKurduC 1 Reply Last reply
        1
        • J julia_f

          @koahnig
          I would like that my software does a software update itself. I need to stop my software before to do a software update (with my installer) cuz in Windows, you cannot delete an executed program. And at this point, you must to launch the software in the installer script.

          I would like to know how to do that in the installer script (not in my software/c++)

          CKurduC Offline
          CKurduC Offline
          CKurdu
          wrote on last edited by
          #4

          @julia_f Did you solve the problem? Because I have the same problem.

          You reap what you sow it

          JonBJ 1 Reply Last reply
          0
          • CKurduC CKurdu

            @julia_f Did you solve the problem? Because I have the same problem.

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by JonB
            #5

            @CKurdu , @julia_f

            The answer (I think) is see RunItCheckBox in topic Finished Page on page http://doc.qt.io/qtinstallerframework/noninteractive.html

            The source code at https://github.com/qtproject/installer-framework/blob/master/src/libs/installer/packagemanagergui.cpp shows that if it's checked it does:

            3202     qDebug() << "starting" << program << args; 
            3203     QProcess::startDetached(program, args);
            
            1 Reply Last reply
            2
            • CKurduC Offline
              CKurduC Offline
              CKurdu
              wrote on last edited by
              #6

              I made it by controller script

              function Controller()
              {
              	 installer.installationFinished.connect(function() {
              
              			 var isUpdate = installer.isUpdater();
              			
              			 if(isUpdate)
              			 {
              				 var targetDir = installer.value("TargetDir");
              				 console.log("targetDir: " + targetDir);
              				 installer.executeDetached(targetDir+"/WebSourceManager.exe");			 
              				 
              			 }else{
              				 		 	 var result = QMessageBox.question("quit.question", "Start Program", "Do you want to start the installed application?",QMessageBox.Yes | QMessageBox.No);
              						 if( result == QMessageBox.Yes)
              					 {
              						 var targetDir = installer.value("TargetDir");
              						  console.log("targetDir: " + targetDir);
              						  console.log("Is Updater: " + installer.isUpdater());
              						  console.log("Is Uninstaller: " + installer.isUninstaller());
              						  console.log("Is Package Manager: " + installer.isPackageManager());
              						  installer.executeDetached(targetDir+"/WebSourceManager.exe");			 
              					 }
              				 
              			 }
              			 
              		
                  });
              	installer.updateFinished.connect(function(){
              		var targetDir = installer.value("TargetDir");
              		console.log("targetDir: " + targetDir);
              		installer.executeDetached(targetDir+"/WebSourceManager.exe");	
              	});
              
              }
              

              You reap what you sow it

              1 Reply Last reply
              3

              • Login

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