title: Run a batch script before uninstallation using QT Installer Framework
body: <p>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:</p>
  <pre><code>function Component() {
  
  }
  
  function Controller() {
      installer.setDefaultPageVisible(QTInstaller.TargetDirectory, false);
  }
  
  Controller.prototype.uninstallationStartedFunction = function() {
      if(systemInfo.productType == &quot;windows&quot;) {
          installer.gainAdminRights();
          installer.execute(installer.value(&quot;TargetDir&quot;) + &quot;/disable.bat&quot;);
      }
  }
  </code></pre>
  <p>Any help is appreciated.</p>