I have a batch script that does some clean up, which is installed along the main application. However, I cannot seem to execute the batch file before uninstallation. Here is my install script:
function Component() {
}
function Controller() {
installer.setDefaultPageVisible(QTInstaller.TargetDirectory, false);
}
Controller.prototype.uninstallationStartedFunction = function() {
if(systemInfo.productType == "windows") {
installer.gainAdminRights();
installer.execute(installer.value("TargetDir") + "/disable.bat");
}
}
Any help is appreciated.
It depends if this is your component script or controller script. You can use the controller script and should connect to the installer signals handle to have a callback function to execute if the uninstallation is running. For example