rbywater
Posts: 6
Joined: Mon Nov 11, 2013 10:25 pm

Prerequisite via CLI

I have a working AI 10.7 project I am trying to migrate to a CLI-created project using AI 10.8. However, I seem to be having trouble with a prerequisite. When I open the project after I create it, the prerequisite does not look correct - specifically the min version is missing.

Here is my cli command:

Code: Select all

AdvancedInstaller.com /edit %projfile% /NewPrerequisite "Java Runtime Environment" -prereq_type OpenSite -prereq_path "http://www.oracle.com/technetwork/java/javase/downloads/index.html" -force_install -search_type RegSubKeyEnum -search_path "HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" -minversion 1.6 -package
Here is how it looks in the project after that is run:

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.PreReqComponent">
    <ROW PrereqKey="JavaRuntimeEnviron" DisplayName="Java Runtime Environment" SetupFileUrl="http://www.oracle.com/technetwork/java/javase/downloads/index.html" Location="2" ExactSize="0" Operator="1" Options="m"/>
    <ATTRIBUTE name="PrereqsOrder" value="JavaRuntimeEnviron"/>
  </COMPONENT>
  <COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
    <ROW SearchKey="JavaRuntimeEnvironment" Prereq="JavaRuntimeEnviron" SearchType="1" SearchString="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" VerMin="1.6" Order="1" Property="PREREQSEARCH"/>
  </COMPONENT>
By way of comparison, here is how it looks in the 10.7 project:

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.PreReqComponent">
    <ROW PrereqKey="EC39D_0B8D_4C2E_A373_7F11E2281A4C" DisplayName="Java Runtime Environment" VersionMin="1.6" SetupFileUrl="http://www.oracle.com/technetwork/java/javase/downloads/index.html" Location="2" ExactSize="0" Operator="1" Options="m"/>
    <ATTRIBUTE name="PrereqsOrder" value="EC39D_0B8D_4C2E_A373_7F11E2281A4C"/>
  </COMPONENT>
  <COMPONENT cid="caphyon.advinst.msicomp.PreReqSearchComponent">
    <ROW SearchKey="EC39D_0B8D_4C2E_A373_7F11E2281A4C_JRE_SEARCH" Prereq="EC39D_0B8D_4C2E_A373_7F11E2281A4C" SearchType="1" SearchString="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment" VerMin="1.0" Order="1" Property="AI_JRE_PREREQSEARCH_PROP"/>
  </COMPONENT>
Anyone have any suggestions?

Thanks!
Rick
Eusebiu
Posts: 4959
Joined: Wed Nov 14, 2012 2:04 pm

Re: Prerequisite via CLI

Hi Rick,

I tested your scenario, but everything worked as expected to me. The 1.6 version was written in the "Minimum" field of the "Registry SubKeys Enumeration" install condition from the "Install Conditions" tab.

Maybe you talk about the "Minimum version" field from the "Properties" tab, but I'm afraid that we don't have a predefined command line switch for that field. However, that field is only informative, it will be displayed to the user in the prerequisites wizard, but it does not affect the prerequisite detection or installation.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
rbywater
Posts: 6
Joined: Mon Nov 11, 2013 10:25 pm

Re: Prerequisite via CLI

Interesting.

I think that what you are saying is reflected in my results, too. I just thought the Display was the real prerequisite. My Install Conditions show a Minimum Required Version of 1.6.

From what I am seeing, the original GUI created-prerequisite was actually not correct. The prerequisite was supposed to be JRE min version 1.6, but the min version was 1.0 in the Install Conditions with the Display min version being 1.6.

So, that leads me to my next question. If I have a post-processing script that adds VersionMin="1.6" to the PreReqComponent row containing my prerequisite, will that add the min version to the display the user will see? If so, we are good.

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

Re: Prerequisite via CLI

Hi Rick,
If I have a post-processing script that adds VersionMin="1.6" to the PreReqComponent row containing my prerequisite, will that add the min version to the display the user will see?
Yes, if you add the VersionMin="1.6" attribute to the PreReqComponent row using a script it should work.

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

Return to “Common Problems”