We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Kim
Posts: 3
Joined: Mon Jun 18, 2007 1:06 pm

Conditional installation based on Result property

Hi

Im trying to install certain files to a directory specified in the registry.

To do this I have made a search to find the registry key containing the path to the folder the files should be installed to.

This works fine.

The problem is that if the key does not exist in the registry, the files should not be installed.
To prevent that I have tried to make a condition for the files (in the Organization tab) like this RESULT_PROPERTY <> ""

This however does not work. If the registry key is not found, a directory called RESULT_PROPERTY is created in the root of C: and the files are then installed to this directory.

Any help would be much appreciated:)
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,

Windows Installer does not accept empty properties as property based folders. In case the property is empty the folder is aways resolved like this: [TARGETDIR]PROPERTY_NAME (in this case: C:\RESULT_PROPERTY\).

A solution is to use a condition like this for your component (the value of the property does not contain its name):

Code: Select all

NOT (RESULT_PROPERTY ~>< "RESULT_PROPERTY")
Or you can use a launch condition to stop the installation in case the search fails.

Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Kim
Posts: 3
Joined: Mon Jun 18, 2007 1:06 pm

Hi

Thanks for your quick reply.
That almost did the trick:)

The files are no longer installed, but the folder is still created (even though I have used the same condition on the folder component).
gigi
Posts: 2103
Joined: Tue Apr 11, 2006 9:55 am
Contact: Website

Hi,
The files are no longer installed, but the folder is still created (even though I have used the same condition on the folder component).
I cannot reproduce this behavior. Are you sure you don't have other files in that folder?

If the problem still persist please sent a small test project reproducing this issue to support at advancedinstaller dot com so we can take a look.

Best Regards,
Gigi
______________
Gheorghe Rada
Advanced Installer Team
http://www.advancedinstaller.com
Kim
Posts: 3
Joined: Mon Jun 18, 2007 1:06 pm

Hi again

I tried to make the installer again from scratch, and now it seems to work fine.

Im not sure what went wrong before, but I can no longer reproduce the problem.

Thanks for your help:)

Return to “Common Problems”