Is there no way to fire a property change event from a custom action DLL?

--
Dustin Johnson
CACE Technologies
Tel: 530-758-2790 x109
Fax: 530-758-2781
www.cacetech.com


Dustin Johnson wrote:
I apologize if this is old hat, but I am looking to validate a serial number.  There are two buttons "Next" and "Check Serial", along with a maskededit box linked to the "Serial_Number" property.
When I click the "Check Serial" button it runs the validation DLL which then reads the "Serial_Number" property and sets the "SerialAccepted" property to "1" if success and unsets the property on failure.
This "SerialAccepted" property is the condition for enabling and disabling the "Next" button.  When I run this setup, everything works; the "Serial_Number" property is read and the "SerialAccepted" property is set to "1".  However, the "Next" button remains disabled.  If I click back to go to the previous dialog and then forward again the "Next" button is enabled.  It appears to be a refresh issue with the button, not that it isn't getting the event.

I've spent quite a lot of time on this and just can't seem to pull it off.  What am I doing wrong?

Example code:
     <Binary Id="License_Helper" SourceFile="$(env.SETUP_FILES_DIR)\license_helper.dll"/>
    <CustomAction Id='Test_Serial' BinaryKey='License_Helper' DllEntry='ValidateSerial' Execute='immediate' Return='asyncWait'/>

    <UI>
       <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Text="!(loc.WixUINext)" >
          <Condition Action=""><![CDATA[SerialAccepted <> "1"]]></Condition>
          <Condition Action="">SerialAccepted = "1"</Condition>
        </Control>
        <Control Id="Check_Serial" Type="PushButton" X="236" Y="203" Width="56" Height="17" Text="Check Serial" >
          <Publish Event="DoAction" Value="Test_Serial">1</Publish>
        </Control>


        <Control Id="Serial_Number_MaskedEdit" Type="MaskedEdit" X="20" Y="100" Width="205" Height="15" Property="Serial_Number">
          <Text><![CDATA[<????-????-??-????-????>]]></Text>
          <Publish Event="DoAction" Value="Test_Serial">1</Publish>
        </Control>
    </UI>

Log output:
Action 12:36:10: <MyProduct>_InputSerialDlg. Dialog created
MSI (c) (78:50) [12:36:11:623]: Doing action: Test_Serial
Action 12:36:11: Test_Serial.
Action start 12:36:11: Test_Serial.
MSI (c) (78:A0) [12:36:11:626]: Invoking remote custom action. DLL: C:\Users\<My_UserID>\AppData\Local\Temp\MSI3C9B.tmp, Entrypoint: ValidateSerial
MSI (c) (78:A8) [12:36:11:627]: Cloaking enabled.
MSI (c) (78:A8) [12:36:11:627]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (78:A8) [12:36:11:627]: Connected to service for CA interface.
MSI (c) (78!D0) [12:36:11:682]: PROPERTY CHANGE: Adding SerialAccepted property. Its value is '1'.
Action 12:36:12: <MyProduct>_InstallDirDlg. Dialog created
Action 12:36:12: <MyProduct>_InputSerialDlg. Dialog created
Action 12:36:17: CancelDlg. Dialog created

--
Dustin Johnson
CACE Technologies
Tel: 530-758-2790 x109
Fax: 530-758-2781
www.cacetech.com

------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

_______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to