>> In the custom action code session["PIDKEY"] is null.   

Why the quotes around PIDKEY?  

Phil Wilson 

-----Original Message-----
From: Oscar Newkerk [mailto:[email protected]] 
Sent: Tuesday, September 01, 2009 8:54 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Custom action from a dialog

I finally figured out that the Log messages were just not going to show up and 
wrote a property to see some debug info.

Now I'm seeing something even weirder.  Wix version:  3.0.5419.0

I have a custom UI sequence that I based on the standard WixUI_InstallDir 
sequence.

In my product.wix I declare a couple of properties and reference the dialog 
sequence:

    <Property Id="PIDKEY" Value="None" ></Property>
    <Property Id="CHECKKEY" Value="None"></Property>
    <Property Id="VALIDATEKEY" Value="0"></Property>
    <Property Id="WIXUI_INSTALLDIR" Value="APPLICATIONROOTDIRECTORY" />
    <UIRef Id="WixUI_InstallDirBusyOnBusy"/>

In the custom dialog to validate the PID I hook my custom action to the "Next" 
control.  The custom action 
uses the value of PIDKEY as the key and sets a property "VALIDATEKEY" to 
indicate the result.

<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" 
Default="yes" Text="!(loc.WixUINext)">
<Publish Event="DoAction" Value="ValidatePIDAction" Order="1">1</Publish>
<Publish Event="NewDialog" Value="InstallDirDlg" Order="2"><![CDATA[VALIDATEKEY 
= "1"]]></Publish>
<Publish Event="SpawnDialog" Value="BadPIDCancelDlg" 
Order="3"><![CDATA[VALIDATEKEY <> "1"]]></Publish>
</Control>

<Control Id="Key" Type="MaskedEdit" X="20" Y="100" Width="320" Height="18" 
Property="PIDKEY" Indirect="yes" 
Text="&amp;&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;&amp;-&amp;&amp;&amp;&amp;&amp;"
 />

In the custom action code session["PIDKEY"] is null.  However, session["None"] 
returns the value entered in the Key control.

I figured this out looking in the setup log file where I found this:

Property(C): PIDKEY = None
Property(C): None = "the PID value I entered"

Any idea what I'm doing wrong with the properties?

Thanks

Oscar

-----Original Message-----
From: Richard [mailto:[email protected]] 
Sent: Monday, August 31, 2009 3:57 PM
To: [email protected]
Subject: Re: [WiX-users] Custom action from a dialog


1) When you invoke a CA through a dialog control event, the messages
you attempt to write to the log don't end up in the log.  You can work
around this for debugging by using MessageBox or OutputDebugString to
write out logging information.

2) When you invoke a CA through a dialog control event, and the CA
sets properties, the dialog processing logic in the MSI runtime
doesn't realize you've changed properties and it doesn't re-evaluate
subsequent event conditions using the new property value.  You can
work around this by inserting a phony event that sets the property to
its value, i.e. Foo = [Foo].
-- 
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
 <http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

      Legalize Adulthood! <http://legalizeadulthood.wordpress.com>



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to