installer.updateFinished() never called



  • Re: QtIFw: updateFinished does not called

    bumping this topic.

    I have a file in the target dir i have to write to on installation and on update. Installation works fine but the update mode maintenance tool does not even call the ControlScript or the updateFinished() signal at all. I know this because my message doesn't appear in the log and the file is not appended with the text. I need admin rights because i'm on windows and the file lives next to the executable in Program Files.

    //installer FW 3.0
    function Controller()
    {
    	console.log("setting up control script"); //works on install, does not work on update
    	installer.installationFinished.connect(writeEnv); //works on install
    	installer.updateFinished.connect(writeEnv); //does not work on update
    }
    
    writeEnv = function()
    {
    	console.log("gaining rights...");
    	if(installer.gainAdminRights())
    	{
    		installer.performOperation("AppendFile", ["@TargetDir@/myFile", "blah blah blah"]);
    		console.log("appended text to file");
    	}
    	else
    	{
    		console.log("[ERROR] didn't have permission to append to the file.");
    	}
    }
    

Log in to reply