tushar.chhabhaiya
Posts: 5
Joined: Tue Jul 16, 2013 12:18 pm

Prerequisites install condition

There are several options for install condition of prerequisite but I want some different condition for below case.

Let's say I want to put 2010 Microsoft office primary interop assemblies as prerequisite. Now there are two install condition for that.

1. Product version check to check interop assemblies are installed or not.
2. Registry check to check whether excel 2010 is installed or not.

Now my prerequisite should install only when my first condition is false and second condition is true.

How could I achieve this using advance installer.

I am not able to find any option like that. What I found are
1. Install only if at least one condition is false.
2. Install only if all conditions are false.

Neither first nor second condition is satisfy my requirement.

Please help me.
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisites install condition

Hi and welcome to Advanced Installer forums.

In order to achieve this you can use the "Registry value with specified content" search criteria and from the "Comparison" combobox choose the "Does not contain" option or "Different than" option.

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tushar.chhabhaiya
Posts: 5
Joined: Tue Jul 16, 2013 12:18 pm

Re: Prerequisites install condition

Thanks,

But can we achieve same with that?

One more thing I have added 2010 Microsoft Office Primary Interop Assemblies as prerequisite in installer project. After that when I run installer, Installer is not able to detect 2010 PIA as prerequisite. Mean it's not in prerequisite window of installer, there I found other prerequisite like Framework 3.5 sp1 etc.

Even though in my system 2010 PIA is not installer, it's not asking me to install that as prerequisite.

Image for reference.

Image
http://www.imm.io/1cI8T

Regards,
Tushar Chhabhaiya
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisites install condition

Hi Tushar,
But can we achieve same with that?
Yes, in your case you can achieve the same thing. The "Does not contain" option searches in a string and the "Different than" option compares the whole string.
Even though in my system 2010 PIA is not installer, it's not asking me to install that as prerequisite.
In the image you attached I can see that it is "found an acceptable version" on your machine for the "2010 Microsoft Office PIA" prerequisite. To test this, you can go in the Install Condition tab, select your searches and click the "Evaluate..." button to see their results.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tushar.chhabhaiya
Posts: 5
Joined: Tue Jul 16, 2013 12:18 pm

Re: Prerequisites install condition

Hi Eusebiu,

My requirement is to check for registry key exist I can not check for "does not contain" option.

By the way,

When I Add 2010 PIA Prerequisite. It automatically add two condition as shown in image.

Image
http://www.imm.io/1cIoj

Now when I have evaluated these condition.

I got FAILURE for first component check condition and SUCCESS for excel 2010 registry check condition.

Here "Install if all conditions are false option" is selected so this will not install.

What should I do to install this prerequisite correctly?

Regards,
Tushar Chhabhaiya
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisites install condition

Hi Tushar,

If you use the search criteria I described above, you will get the following results:
  • Product Version criteria - FAILURE
    Excel 2010 criteria
    (is not installed) - SUCCESS (if Excel is not installed then the search IS "Different than" the value you set and it returns SUCCESS)
    In this case the prerequisite will not be installed if the "Install if all conditions are false" option is selected.

    Product Version criteria - FAILURE
    Excel 2010 criteria
    (is installed) - FAILURE (if Excel is installed then the search IS NOT "Different than" the value you set and it returns FAILURE)
    In this case the prerequisite will be installed if the "Install if all conditions are false" option is selected.
Let us know if you have any other question.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tushar.chhabhaiya
Posts: 5
Joined: Tue Jul 16, 2013 12:18 pm

Re: Prerequisites install condition

Hi Eusebiu,

But we can not but "Different than" registry condition to detect Excel 2010.

we check this registry.

HKLM\SOFTWARE\Microsoft\Office\14.0\Excel\InstallRoot\Path

How can we put Different than condition for this??

As value of path registry key would be different in different machine.

Regards,
Tushar Chhabhaiya
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisites install condition

Hi Tushar,

Indeed, you cannot use that search criteria in this case, but you can use the "Registry value does not exists" search.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tushar.chhabhaiya
Posts: 5
Joined: Tue Jul 16, 2013 12:18 pm

Re: Prerequisites install condition

Hi Eusebiu,

Thank you very much. Problem solved. :)

Thanks,
Tushar Chhabhaiya
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisites install condition

You're welcome. I'm glad you got this working.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”