I can't figure out why Candle doesn't seem to find the RegistrySearch element 
in the "util" namespace, as it throws this error:

Fragment element contains an unhandled extension element 'util:RegistrySearch'.
 Please ensure that the extension for elements in the 'http://schemas.microsoft.
com/wix/UtilExtension' namespace has been provided.

Maybe I'm not using the Fragment as it is intended? Any advice would be 
appreciated.

This is what my source looks like:

<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi' 
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

<Fragment>
        <util:RegistrySearch
                Id="Java7FamilyVersion"
                Root="HKLM"
                Key="SOFTWARE\JavaSoft\Java Runtime Environment"
                Value="Java7FamilyVersion"
                Variable="Java7FamilyVersion"
        />
        <util:RegistrySearch
                Root="HKLM"
                Key="SOFTWARE\JavaSoft\Java Runtime 
Environment\[Java7FamilyVersion]\MSI" Value="PRODUCTVERSION"
                Variable="JavaProductVersion"
                After="Java7FamilyVersion"
                Condition="Java7FamilyVersion"
        />

        <PackageGroup Id="Java7Runtime">
                <ExePackage
                        Id="Java7Runtime"
                        DisplayName="Java Runtime Version 7"
                        Cache="no"
                        Compressed="yes"
                        PerMachine="yes"
                        Permanent="yes"
                        Vital="yes"
                        Name="lib\jre-7u21-windows-i586.exe"
                        SourceFile="\lib\jre-7u21-windows-i586.exe"
                        InstallCommand="/s ADDLOCAL=jrecore IEXPLORER=1 
MOZILLA=1 JAVAUPDATE=0 JU=0 SYSTRAY=0 AUTOUPDATECHECK=0 REBOOT=Suppress /L*v 
&quot;[WixBundleLog_Java7Runtime]&quot;"
                        DetectCondition="Java7FamilyVersion AND 
(JavaProductVersion &gt;= v7.0.210)"
                ></ExePackage>
        </PackageGroup>
</Fragment>

<Product...

Alain

-----Original Message-----
From: Alain Forget [mailto:afor...@cmu.edu] 
Sent: May 30, 2013 14:17
To: 'Neil Sleightholm'
Subject: RE: [WiX-users] Download and install Java

Oh interesting, so I don't even need to define WixBundleLog_Java7Runtime?

Another issue: candle couldn't recognise the "util" prefix for the 
util:RegistrySearch elements, so I added 
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"; to my top-level Wix 
element, but I'm now getting the following candle error:

Fragment element contains an unhandled extension element 'util:RegistrySearch'.
 Please ensure that the extension for elements in the 'http://schemas.microsoft.
com/wix/UtilExtension' namespace has been provided.

Any idea what I might be missing?

Alain

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com]
Sent: May 30, 2013 14:03
To: afor...@cmu.edu
Subject: RE: [WiX-users] Download and install Java

Yes WixBundleLog_Java7Runtime is the log file, WiX creates this variable for 
you and is WixBundleLog with your ExePackage/@Id appended e.g. 
%temp%\YouBundleName_20130430071941_0_Java7Runtime.log.

Neil

-----Original Message-----
From: Alain Forget [mailto:afor...@cmu.edu]
Sent: 30 May 2013 18:50
To: Neil Sleightholm; 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] Download and install Java

Ahhhh perfect, I understand now, thanks.

And I assume "[WixBundleLog_Java7Runtime]" is the location you want the Java 
installer log to output.

Alain

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com]
Sent: May 30, 2013 13:43
To: afor...@cmu.edu; 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] Download and install Java

1.7.0_21 is not a "normal" version number that WiX can compare so that is why I 
need the two stage search, the first one gets the registry key and then once 
you have that you can search for the proper version number in the MSI sub key. 

Specifying v7.0.210 in the comparison makes WiX treat what follows the "v" as a 
version number so the comparison is actually 7.0.210 >= 7.0.210 which is true. 
(Version comparison breaks the version string in to its component parts and 
compares each part.)




Neil

-----Original Message-----
From: Alain Forget [mailto:afor...@cmu.edu]
Sent: 30 May 2013 18:20
To: Neil Sleightholm; 'General discussion for Windows Installer XML toolset.'
Subject: RE: [WiX-users] Download and install Java

Cool, I think we'll go with this approach. Comparing what's in my registry with 
what seems to be going on below and since I have no experience with registry 
searches or ExePackages, I have some questions:

1) The Java version seems to be the value HKLM\SOFTWARE\JavaSoft\Java Runtime 
Environment\Java7FamilyVersion, which seems to be what Java7FamilyVersion 
fetches. However, why doesn't WiX ever compare Java7FamilyVersion with what's 
supposed to be the correct value (i.e. 1.7.0_21)?

2) Since Java7FamilyVersion already seems to get the version, what's the point 
of doing the second registry search (i.e. "JavaProductVersion")?

3) In my registry, the JavaProductVersion looks like it would fetch "7.0.210", 
which would always result in the condition "JavaProductVersion &gt;= v7.0.210" 
being FALSE, no? (Since "7.0.210" != "v7.0.210")

4) What is/should be "[WixBundleLog_Java7Runtime]"?

Alain

-----Original Message-----
From: Neil Sleightholm [mailto:n...@x2systems.com]
Sent: May 30, 2013 04:55
To: afor...@cmu.edu; General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Download and install Java

This is what I do, it doesn't do the download as I prefer to embed the file but 
that shouldn't be too hard to add:

<Fragment>
    <util:RegistrySearch
      Id="Java7FamilyVersion"
      Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime Environment"
Value="Java7FamilyVersion"
      Variable="Java7FamilyVersion" />
    <util:RegistrySearch
      Root="HKLM" Key="SOFTWARE\JavaSoft\Java Runtime 
Environment\[Java7FamilyVersion]\MSI" Value="PRODUCTVERSION"
      Variable="JavaProductVersion" After="Java7FamilyVersion"
Condition="Java7FamilyVersion" />

    <PackageGroup Id="Java7Runtime">
      <ExePackage Id="Java7Runtime"
        DisplayName="Java Runtime Version 7"
        Cache="no"
        Compressed="yes"
        PerMachine="yes"
        Permanent="yes"
        Vital="yes"
        Name="Redist\jre-7u21-windows-i586.exe"
        SourceFile="..\Packages\jre-7u21-windows-i586.exe"
        InstallCommand="/s ADDLOCAL=jrecore IEXPLORER=1 MOZILLA=1
JAVAUPDATE=0 JU=0 SYSTRAY=0 AUTOUPDATECHECK=0 REBOOT=Suppress /L*v 
&quot;[WixBundleLog_Java7Runtime]&quot;"
        DetectCondition="Java7FamilyVersion AND (JavaProductVersion &gt;= 
v7.0.210)">
      </ExePackage>
    </PackageGroup>
  </Fragment>



Neil


>Hi all,
>
>Surely this has been done by someone, but I haven't found anything 
>definitive on it so far.
>
>I'd like our installer to check that Java is installed (preferably 6 or 
>7), and if it isn't, then download and install it. We want it to be as 
>seamless as possible to make life as easy for the user as possible.
>
>Worst case scenario, I suppose we could always direct the user to the 
>java website and ask the user to start our installer again once Java's 
>installed. But I'm wondering if it's possible to do any better.
>
>Any thoughts?
>
>Alain
>
>***************************************
>Alain Forget, Ph.D.
>Postdoctoral Researcher
>CyLab, Carnegie Mellon University
>afor...@cmu.edu
>http://cups.cs.cmu.edu/~aforget/
>***************************************
>
>
>
>
>-----------------------------------------------------------------------
>---
>----
>Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET 
>Get 100% visibility into your production application - at no cost.
>Code-level diagnostics for performance bottlenecks with <2% overhead 
>Download for free and get started troubleshooting in minutes.
>http://p.sf.net/sfu/appdyn_d2d_ap1
>_______________________________________________
>WiX-users mailing list
>WiX-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/wix-users




------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to