Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QtIFW - addOperations only for installation but not update
Forum Updated to NodeBB v4.3 + New Features

QtIFW - addOperations only for installation but not update

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
1 Posts 1 Posters 398 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Michael A. Leonetti
    wrote on last edited by
    #1

    On my installer, when my program is installed it runs the custom configuration application that is installed. However, I only want this program to be run on installation and not during the update process. The update process will be silent, after all. How could this be done?

    Here is an example of what I mean:

    Component.prototype.createOperations = function() {
    	// Call up
    	component.createOperations();
    
    	//console.log( "YEP" );
    
    	if( systemInfo.productType=="windows" ) {
    		/**********
    		* This is the code that I only want to execute during installation and not updating.
    		**********/
    		component.addElevatedOperation( "Execute", "@TargetDir@/config.exe", installer.value( "key" ), installer.value( "hostname" ) );
    		
    		component.addElevatedOperation( "Execute", "@TargetDir@/service.exe", "-install", "UNDOEXECUTE", "@TargetDir@/service.exe", "-uninstall" );
    
    		component.addElevatedOperation( "Execute", "{0,2}", "net", "start", "My Service", "UNDOEXECUTE", "net", "stop", "My Service" );
    
    		// Shortcut to run the connect
    		component.addElevatedOperation( "CreateShortcut", "@TargetDir@/connect.exe", "@StartMenuDir@/My Connect.lnk",
    				"workingDirectory=@TargetDir@");
    
    		// Uninstaller
    		component.addElevatedOperation( "CreateShortcut", "@TargetDir@/maintenancetool.exe", "@StartMenuDir@/Uninstall.lnk",
    				"workingDirectory=@TargetDir@", "description=Uninstall My Connect");
    
    		// Startup
    		component.addElevatedOperation( "CreateShortcut", "@TargetDir@/connect.exe", "@AllUsersStartMenuProgramsPath@/Startup/My Connect.lnk",
    				"workingDirectory=@TargetDir@");
    	}
    	
    	//installer.setCancelled();
    }
    

    Thanks!

    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