Ah!!  I figured it out...   It's because the CustomAction was executing
before AppSearch (because I had After="FindRelatedProducts")!  Once I
specified After="AppSearch" it works great...  

-mdb

-----Original Message-----
From: Michael Bray 
Sent: Friday, October 23, 2009 8:41 PM
To: General discussion for Windows Installer XML toolset.
Subject: RE: [WiX-users] Why isn't my property evaluating??

Doesn't seem to help...   It still doesn't detect the registry key
correctly and the output text seems to indicate that the value is empty
for both MSXML6 and TEST properties.

-mdb

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Friday, October 23, 2009 8:31 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Why isn't my property evaluating??

Add Secure="yes" to your <Property Id="MSXML6"> element (<Property
Id="MSXML6" Secure="yes">)

AppSearch runs as if it were marked Execute="oncePerProcess", so once it
runs in InstallUISequence, it won't run again in InstallExecuteSequence.
Because MSXML6 isn't a "secure" property, it isn't always communicated
from
the UI sequence to the server.

BTW: It's usually considered a bad idea to open web browsers from
InstallExecuteSequence. UI should be confined to the UI sequence, with
the
singular exception of using MsiProcessMessage (or equivalent API) to
send
error messages from CAs running in InstallExecuteSequence. The
<CustomAction
Error=.../> actions are acceptable in either sequence since it does the
same
thing (a MsiProcessMessage-like action).

-----Original Message-----
From: Michael Bray [mailto:mb...@ctiusa.com] 
Sent: Friday, October 23, 2009 3:23 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Why isn't my property evaluating??

I'm trying to simulate the InstallURL property of a VS.net install
MSI... I've got to the ponit where the WIX MSI will open a browser to
the download page that I want it to go to. I thought things were going
great because on my test machine, the web page opened when I didn't have
the MSXML6 component installed. However things went downhill when I
discovered that the web page opened even when I DID have the component
installed.

I'm searching for the MSXML6 component using a Property w/ a
RegistrySearch. However, as best as I can tell, the registry value isn't
even being evaluated, and thus it "always" looks like it isn't
installed.

Here's the relevant portion of my WXS:

      <Property Id="MSXML6">
                <RegistrySearch Id="MSXML6Search" Root="HKCR"
Key="Msxml2.DOMDocument.6.0" Type="raw" />
        </Property>
        <Property Id="TEST">
                <RegistrySearch Id="TESTSearch" Root="HKLM" Type="raw"
Name="Version" Key="SOFTWARE\Microsoft\DirectX" />
        </Property>
        <Property Id="cmd.exe" Value="cmd.exe" />
        <CustomAction Id="OpenMSXML6Download" Property="cmd.exe"
ExeCommand="/c start
http://www.microsoft.com/downloads/details.aspx?FamilyID=993c0bcf-3bcf-4
009-be21-27e85e1857b1" Execute="immediate" Return="check" />
        <CustomAction Id="OpenMSXML6DownloadError" Error="This component
requires MSXML6. =[MSXML6]=[cmd.exe]=[TEST]=  A web browser has been
opened to the download page.  Please install MSXML6 and then re-install
the connector." />

        <!-- installation execution sequence -->
        <InstallExecuteSequence>
                <!-- wires the error dialog to the downgrade event -->
                <Custom Action="PreventDowngrading"
After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>

                <!-- execution to delete old install info after
upgrade-->
                <RemoveExistingProducts After="InstallValidate" />

                <!-- Forces MSXML6 to be pre-installed -->
                <!-- <Custom Action="OpenMSXML6Download"
Before="FindRelatedProducts">NOT MSXML6</Custom> -->
                <Custom Action="OpenMSXML6Download"
Before="FindRelatedProducts">NOT MSXML6</Custom>
                <Custom Action="OpenMSXML6DownloadError"
After="OpenMSXML6Download">NOT MSXML6</Custom>
        </InstallExecuteSequence>

        <!-- ui information for the custom actions above. -->
        <InstallUISequence>
                <Custom Action="PreventDowngrading"
After="FindRelatedProducts">NEWPRODUCTFOUND</Custom>
                <Custom Action="OpenMSXML6Download"
Before="FindRelatedProducts">NOT MSXML6</Custom>
                <Custom Action="OpenMSXML6DownloadError"
After="OpenMSXML6Download">NOT MSXML6</Custom>
        </InstallUISequence>

 

What this does is if MSXML6 isn't defined then it opens the web page and
then prints the custom error message. Note that I'm trying to print the
value of the property in the error message (I'm not sure if this is
valid or not, but it seems to be.) The text that I see says "This
component requires MSXML6. ==[cmd.exe]==..." so it is printing the value
of the 'cmd.exe' property but not the other two... maybe that's because
I define the property explicitly, I'm not sure... Anyway, I also ran the
MSI with debugging on, and in the log file, I see absolutely no
reference at all to the MSXML6 or the TEST properties ever being set.
I've confirmed that the registry values are indeed set, although I'm not
100% sure how to handle the Msxml2 registry key, since it doesn't have
any real values, only a default value. (I'm assuming that leaving off
the 'Name' parameter is the right way to handle this.)

Help??

-mdb

------------------------------------------------------------------------
----
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------
------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and
stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to