Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtIFW: Custom uninstall scripts



  • Hi,

    how can i call custom uninstall scripts for each component.
    I had two approaches:

    1. In the Component script:
    Component.prototype.createOperations = function()
    {
        component.createOperations();				
    	QMessageBox.information("asasas", "asasa", "Hall", QMessageBox.Ok);	
    		
    	if(installer.isInstaller()){
    		QMessageBox.information("asasas", "asasa", "isInstaller", QMessageBox.Ok);	
    	}
    	
    	if(installer.isUninstaller()){
    		QMessageBox.information("asasas", "asasa", "isUninstaller", QMessageBox.Ok);	
    	}		
    }
    

    The isInstaller-condition is called every time when i install my application. When i call the Maintanance-tool and remove everything, the isUninstalled-condition will not be called. Also the MessageBox with "Hall" is not called in the uninstaller.

    1. UNDOEXEC in the EXECUTE-command
      This does not work for uninstaller. I think i misunderstood this option.

    Thank you for your help.
    best regards

    UPDATE:
    UNDOEXECUTE works. But why is the isUninstaller-condition never called?



  • @Schenk said in QtIFW: Custom uninstall scripts:

    But why is the isUninstaller-condition never called?

    Because you never called the if condition in the constructor of Controller
    Refer Controller Scripting
    Use Controller Scripting as suggested in the 2nd comment https://stackoverflow.com/a/33170889

    Works for me
    alt text


Log in to reply