Today we'll be discussing about an interesting scenario I got from one of our customers.
Say you have a plugin file that you want installed for a 3rd party product, such as Adobe.
Now, you do not know which Adobe version your client has installed, so you want to cover all cases.
To do so, create a search for each of the Adobe that might be present on the machine. Such search can look like this:
As you can see, it retrieves the path from the registries where the plugin should be installed and stores the path into a property, e.g. ADOBE_22.
Now, for each version of Adobe, we create a property based folder in the "Files and Folders" page, like so:
Now, the problem the customer encountered was the fact that, if the search did not result into anything, the plugin would be copied into a folder like C:\ADOBE_22.
This is the normal behavior, as the default path for a property based folder is ROOTDRIVE:\PROP_NAME.
ROOTDRIVE property
So, if the search does not result into anything, a folder with the name of the property will be created on the rootdrive, in our case that being C:\.If the Directory column of the Directory table indicates the root destination directory by a property name that is undefined, the installer uses the value of the ROOTDRIVE property to resolve the path to the destination directory.
The solution to this will be presented below, step-by-step:
- copy each search you have in the Search page and name it something like ADOBE_22_EXISTS
- use the new properties as conditions for each component
Now, at install time, only the folders for which the registry search returned something should be created on the disk. The other folders created with the default path of ROOTDRIVE:\PROP_NAME should no longer be created.
Hope this helps!
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging