how to install one file or another depending on a property - Advanced Installer Community

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!

jtss
Posts: 15
Joined: Wed Nov 05, 2008 3:23 am

how to install one file or another depending on a property

Hello.
This should be simple but I'm not seeing it in the help or the forums.
I have Advanced Installer Pro v7.7

I want a user to be able to set a property in the setup command line, e.g. MYDLLVER=1 or MYDLLVER=2
Then depending on the value of the MYDLLVER property, I want the installer to copy either mydllv1.dll or mydllv2.dll into the install directory.
(e.g. depending on which version of some hardware is installed on the machine; and yes I know it's not user-friendly but it's for admins).

How do I do this?

thanks in advance!
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: how to install one file or another depending on a property

Hello,

Make sure each file is in its own separate component in the Organization page. Select each component and fill in the Condition field in the right pane. Use your property inside that condition to form a proper condition to determine whether the component should be installed or not.

Let me know if this helps.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
jtss
Posts: 15
Joined: Wed Nov 05, 2008 3:23 am

Re: how to install one file or another depending on a property

duh. I missed the "conditional install level" link in the Feature Properties - the "install level" was throwing me off.
it looks like I also could have left the 2 files in the same feature and set a Condition (without the confusing "install level" part) on the Component Properties.

thanks!

Return to “Common Problems”