Removing Features - Advanced Installer Community
IraRainey
Posts: 5
Joined: Thu Dec 18, 2014 4:35 pm

Removing Features

I have an MSI that has several features, one of which I now wish to move the files under another feature and remove the added complexity of the unused feature. However cannot remove the feature if there are still files associated to it. This makes sense, however even moving the files into another feature, in fact even removing the files from the MSI at all still leaves me unable to remove the feature.

It looks like it still thinks it has files under the seemingly empty feature, even files that are no longer part of the MSI. I have battled with the for some time but can find no solution. Is this a bug?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing Features

Hello and welcome to Advanced Installer forums,

You should make sure that in the Organization page the feature is completely empty. If it is, please send us the project file(.AIP) to support at advanced installer dot com so we can investigate it.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IraRainey
Posts: 5
Joined: Thu Dec 18, 2014 4:35 pm

Re: Removing Features

So I can move all the items under the feature into another feature, and then move the files from the directory into another under Files and Folders, but it still won't let me remove the folder that the feature installed into.

Despite the folder being empty when I try to delete it, it says: "This directory can't be removed because some of its members are referenced by other items. Do you want to search for those references?"

If I click search then the results are empty.
IraRainey
Posts: 5
Joined: Thu Dec 18, 2014 4:35 pm

Re: Removing Features

Also because I can't delete the files listed under the feature, I can only drag them into another feature (which is what I actually want to do anyway), when I do that it then has a duplicate listing for that file under the feature despite there only being one file installed.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing Features

Yes, please send us the .AIP project file so we can take a look. Also, make sure there are no dependencies required when opening it.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IraRainey
Posts: 5
Joined: Thu Dec 18, 2014 4:35 pm

Re: Removing Features

OK, thanks. I'll send you the file.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing Features

Hello,

Indeed I can replicate the behavior and this seems to be a bug in Advanced Installer. Thank you for bringing it to our attention, I will get back to you after troubleshooting the issue throughly.

The meanwhile workaround is to:
- go to Files and Folders page
- select Properties from the folder's context menu
- go to Operations tab and enable "Remove folder" option > "Remove folder only if it is empty"

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
IraRainey
Posts: 5
Joined: Thu Dec 18, 2014 4:35 pm

Re: Removing Features

OK thanks for that. What about the duplicated item references/files under the feature?
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing Features

After a bit more digging I found the reason and I don't think development can do much about the behavior.

Those files are .DLLs and each had auto-registration enabled from the Properties -> Registration tab. Implicitly, this option extracts registry entries in the Registry page for each file. Upon creating the registry entries components, Windows Installer needs the registry component Directory field to be filled in and that is set to the registered file's parent folder.

When moving the files in another folder, their component Directory field can be detected and is updated correctly. However, since there is no link between this move operation and the registry entry components created upon registration, the registry entry components Directory field won't be updated to the new location.

To sum up, the components with similar names aren't duplicates, they point to registry entries created when selecting "Auto register file" option.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Removing Features

Another workaround you can try is:
- start from the project before moving any file
- unregister all .DLL files from COM Service Gateways folder
- move them to the new folder
- register them again in the new location

Note you can use bulk selection for the registration.

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”