abe_mailbird
Posts: 1
Joined: Mon Sep 27, 2021 9:50 am

Command File to add specific file to component

Mon Sep 27, 2021 10:07 am

Hello!

I'm using command line to build installer, so we're adding and removing file using commands in here: https://www.advancedinstaller.com/user- ... iting.html

However, we encounter these issues:
1. When adding a new non-dll/non-exe file, it will be added to the existing component that is consisted of non-dll or non-exe files instead of creating a new component for them. How to avoid this behavior? does AddFile command (https://www.advancedinstaller.com/user- ... -file.html) have any additional parameter to assign newly added file to a new component?
2. Due to "install new version first then uninstall old version" setting, since non-dll/non-exe files are added in a component, when the file that is set as the keypath of the component is removed, all of the files in that component are removed. this is causing our application to fail since some files are falsely deleted. How to avoid this? We don't want to change the "install new version first then uninstall old version" setting since it will make our app's taskbar pin broken after the upgrade.

Catalin
Posts: 4428
Joined: Wed Jun 13, 2018 7:49 am

Re: Command File to add specific file to component

Tue Sep 28, 2021 5:05 pm

Hello and welcome to our forums,
1. When adding a new non-dll/non-exe file, it will be added to the existing component that is consisted of non-dll or non-exe files instead of creating a new component for them. How to avoid this behavior? does AddFile command (https://www.advancedinstaller.com/user- ... -file.html) have any additional parameter to assign newly added file to a new component?
Unfortunately, this is not currently possible.

I have, however, added this on our TODO list of improvements and hopefully this will be added in a future version of Advanced Installer.
2. Due to "install new version first then uninstall old version" setting, since non-dll/non-exe files are added in a component, when the file that is set as the keypath of the component is removed, all of the files in that component are removed. this is causing our application to fail since some files are falsely deleted. How to avoid this? We don't want to change the "install new version first then uninstall old version" setting since it will make our app's taskbar pin broken after the upgrade.
Unfortunately, this is how the Windows Installer performs the upgrade when that option is used.

A solution to this would be manually moving the files to a new component using the "Move to New Component" option.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”