Hi 

I have a custom action in C# that only put a value in a property
session["VALIDATEUSER"] = "1"; or session["VALIDATEUSER"] = "0";. The
purpose of that CA is to check if a username and password provided by the
user is valid. If only using 0 and 1 now to do some testing. I have a dialog
that can call that custom action from 2 push button in the dialog (A
"btnValidateUser" and the "Next" button). 

Now, when I press the "btnValidateUser", the CA is called and I have a
condition to open a "DLG_InvalidUser" dialog if the user is invalid. This is
working fine. The dialog open ("DLG_InvalidUser") if the CA put "0" in
session["VALIDATEUSER"] but the dialog dont open if the CA put "1". 

But on the "Next" button of the same dialog, the "DLG_InvalidUser" never get
called. I really dont know what i'm doing wrong here. Below is the code from
the main dialog and the custom action. 

Can you guy help me on that !!! 

Thanks very much and have a great day 

(Sorry for the bad english, im french canadian) 

Rich 

//Custom action start// 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using Microsoft.Deployment.WindowsInstaller; 
using System.Windows.Forms; 

namespace SetupWIXTest_CS 
{ 
    public class CustomActions 
    { 
        [CustomAction] 
        public static ActionResult CS_validateUser(Session session) 
        { 
            session["VALIDATEUSER"] = "1"; 
            return ActionResult.Success; 
        } 
    } 
} 
//Custom action end// 

//My main dialog// 
<?xml version="1.0" encoding="UTF-8"?> 
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";> 
        <Fragment> 
    <UI> 
      <Dialog Id="DLG1" Width="370" Height="270" Title="[ProductName]
[Setup]" NoMinimize="yes" > 
        <Control Id="Back" Type="PushButton" X="180" Y="243" Width="56"
Height="17" Text="<Back"> 
          <Publish Event="NewDialog" Value="LicenseAgreementDlg">1</Publish> 
        </Control> 
        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="Next>"> 
          <Publish Event="DoAction" Value="CS_validateUser">1</Publish> <!--
Custom action called --> 
          <Publish Property="VALIDATEUSER"
Value="[VALIDATEUSER]">1</Publish> 
          <Publish Event="SpawnDialog"
Value="DLG_InvalidUser"><![CDATA[VALIDATEUSER <> "1" ]]></Publish> <!-- Not
getting called --> 
          <Publish Event='EndDialog' Value='Return'>1</Publish> 
        </Control> 
        <Control Id="btnValidateUser" Type="PushButton" X="20" Y="150"
Width="290" Height="30" Text="CheckBox de test"> 
          <Publish Event="DoAction" Value="CS_validateUser">1</Publish> 
          <Publish Property="VALIDATEUSER"
Value="[VALIDATEUSER]">1</Publish> 
          <Publish Event="SpawnDialog"
Value="DLG_InvalidUser"><![CDATA[VALIDATEUSER <> "1" ]]></Publish> <!--
Working fine --> 
        </Control> 
        <Control Id="Cancel" Type="PushButton" X="304" Y="243" Width="56"
Height="17" Cancel="yes" Text="Cancel"> 
          <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish> 
        </Control> 
      </Dialog> 
    </UI> 
  </Fragment> 
</Wix> 
//End of the main dialog// 
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Change-property-value-in-CA-Not-working-in-UI-tp5283374p5283374.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to