benhinman
Posts: 37
Joined: Wed Aug 06, 2008 7:50 am

Detect feature upgrade.

Hi,

During my installation I configure several application settings. I persist these over upgrade installations by checking the "Permanent" and "Never Overwrite" attributes on the components. During upgrades, I would prefer not to show the user interface for features that were installed and configured previously. I would also like to reference the persisted files such that a custom action can do some work with them.

Is this possible?

Thanks,
Ben
benhinman
Posts: 37
Joined: Wed Aug 06, 2008 7:50 am

Re: Detect feature upgrade.

Ok so I have tried numerous approaches without any luck.

Am I forced to use a component search in order to find the file and then condition the UI on the result?

If so how can I guarentee component GUID's across upgrades when using synchronization?

Am I missing anything obvious here?

Thanks,
Ben
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Detect feature upgrade.

Hi Ben,

You can create File or Component Searches in order to determine if those files exist. The result of the search can be used in conditions for Published Events (to condition the appearance of dialogs) or Control Conditions (to condition the appearance of individual controls on dialogs).
If so how can I guarentee component GUID's across upgrades when using synchronization?
No, when using synchronized folders the Component GUIDs for the Components attached to the files from those folders may change as Components are recreated each time the folder contents change.

You can use a Merge Module to ensure that the Component GUIDs do not change, or use regular folders where necessary.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
benhinman
Posts: 37
Joined: Wed Aug 06, 2008 7:50 am

Re: Detect feature upgrade.

Thanks!

If I do choose to use component guid searching how is the following handled:

1) If I uninstall an application with a permanent file, does that permanent file's component guid registry entries get wiped? (so that if I do a component search in a future installation it won't find that file)
2) When I have done a component search in the past it has found the directory of the file I wanted, but not the full file path (even when I have selected the file option)? Is this correct and if so, how can I get the full path?

Thanks a bunch!
Ben
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Re: Detect feature upgrade.

Hi Ben,
If I uninstall an application with a permanent file, does that permanent file's component guid registry entries get wiped? (so that if I do a component search in a future installation it won't find that file)
The Permanent attribute applies to a Component not to a file. After a client package of a Permanent Component is uninstalled, the Permanent Component will remain on the machine and subsequent Component Searches will find it.
When I have done a component search in the past it has found the directory of the file I wanted, but not the full file path (even when I have selected the file option)? Is this correct and if so, how can I get the full path?
Yes, this is correct if you have used a Search (not a File Search), because a Component can contain more than one file (or no files at all). Since the file name is known, you can simply append it to the Search Property to obtain the full path of the file (where it is needed), for instance:

Code: Select all

[RESULT_PROPERTY]myfile.dll
On the other hand, if you use a File Search, no matter what you enter in the "Name" field, the full path of the key member of the Component will be returned (if the key member is a file), or nothing (if for instance the key path is a registry entry).

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”