Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Prevent maintenance tool from removing copied directories during uninstallation
Forum Updated to NodeBB v4.3 + New Features

Prevent maintenance tool from removing copied directories during uninstallation

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
1 Posts 1 Posters 568 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dbzVT8
    wrote on last edited by
    #1

    For my IFW installer, I added operations to the default component to move some files and directories from the installation directory to another location. However, upon uninstallation, these files and directories are automatically deleted. How can I prevent this from happening? I want to remove everything in the installation directory as usual but for the files that I copied elsewhere I'd like them to remain. Below is my install script. I'd like to prevent the "My AAAT Projects" directory from being deleted upon uninstallation. Any help is very much appreciated!

    function Component()
    {
    }
    
    Component.prototype.createOperations = function()
    {
       component.createOperations();
    
       if (installer.value("os") === "win")
       {
          var appDataDir = installer.environmentVariable("AppData") + "/AAAT";
          if (appDataDir != "")
          {
             component.addOperation("Mkdir", appDataDir);
             component.addOperation("Move", "@TargetDir@/user_database", appDataDir + "/user_database");
          }
    
          // Copy models to user's My AAAT Projects directory
          component.addOperation("Mkdir", "@HomeDir@/Documents/My AAAT Projects");
          component.addOperation("CopyDirectory", "@TargetDir@/AAAT Baselines/", "@HomeDir@/Documents/My AAAT Projects/");
          component.addOperation("CopyDirectory", "@TargetDir@/Sample AAAT Projects/", "@HomeDir@/Documents/My AAAT Projects/");
    
          // Add Desktop and Start Menu shortcuts
          component.addOperation("CreateShortcut", "@TargetDir@/AAAT.exe", "@StartMenuDir@/AAAT.lnk");
          component.addOperation("CreateShortcut", "@TargetDir@/AAAT.exe", "@DesktopDir@/AAAT.lnk");
       }
    }
    
    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved