0

Is there any way to call a windows cmd command at uninstall process (maintainancetool.exe) of Qt installer framework? I tried to connect the installer.uninstallationFinished signal but no results.

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
chatzich
  • 1,083
  • 2
  • 11
  • 26

2 Answers2

1

+1 Bancha's answer. Also if you are executing the windows command as part of uninstalling a component, it might be better to use the UNDOEXECUTE component of the Execute operation since it will execute along with the other uninstall operations for the component.

example:

component.addOperation("Execute", "touch", "test.txt", "UNDOEXECUTE", "rm", "test.txt")
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Moose
  • 111
  • 3
0

You can check whether you are in the uninstall mode by installer.isUninstaller() Below code snippet, may give you a clue.

function Controller() {
    if(installer.isUninstaller()) {
        installer.uninstallationFinished.connect(this, this.uninstallationFinished);            
    }
}
Controller.prototype.uninstallationFinished = function() {
    //Put you cmd that need to execute after uninstalling finish here
}

installer QML Type

Controller Script