Hi ychen,

Try this...

<CustomAction Id='CustomAction1' BinaryKey='InstallerScripts'
VBScriptCall='Test' Return='ignore' />
<CustomAction Id="CustomAction1.LeftProperty" Property="CHKLEFTPROPERTY"
Value="[chkLeft]"/>
<CustomAction Id="CustomAction1.RightProperty"
Property="CHKRIGHTPROPERTY" Value="[chkRight]"/>

........................

 <Custom Action="CustomAction1"
After="CustomAction1.LeftProperty"></Custom>
 <Custom Action="CustomAction1.LeftProperty"
After="CustomAction1.RightProperty"></Custom>
 <Custom Action="CustomAction1.RightProperty"
After="CreateShortcuts"></Custom>

------------------------

//VBScript

Session.Property("CHKLEFTPROPERTY")
Session.Property("CHKRIGHTPROPERTY")

---------------------------

This surely worked for me...

Thanks and Regards,
surekha

-----Original Message-----
From: ychen [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 03, 2008 3:58 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Unable to read the value of a property associated
with a checkbox from vbscript


Hi,

    I have a dialog with checkboxes, each of which is associated with a
property. These properties are declared under Product element as show
below:
<Property Id="chkLeft" />
<Property Id="chkRight" />

    This is how I declare checkboxes in a dialog.
....
<Control Id="option1" Type="CheckBox" X="15" Y="20" Width="200"
Height="15"
Text="Left" Property="chkLeft" CheckBoxValue="x" />
<Control Id="option2" Type="CheckBox" X="15" Y="37" Width="200"
Height="15"
Text="Right" Property="chkRight" CheckBoxValue="y" />
....

    I want to read the values of those properties from vbscript using a
custom action as shown below.

<Binary Id='InstallerScripts' SourceFile='Test.vbs' />
<CustomAction Id='CustomAction1' BinaryKey='InstallerScripts'
VBScriptCall='Test' Return='ignore' />

<InstallExecuteSequence>
        <Custom Action="CustomAction1" After="CreateShortcuts">NOT
Installed</Custom>
</InstallExecuteSequence>

    Here's the Test function in the vbscript.
Function Test()
        sArg = Session.Property("chkLeft")
        msgbox("chkLeft=" & sArg)
End Function

    The problem is that it always prints "chkLeft=" even if the
associated
checkbox is checked. However, I do see the following in the log file
indicating that the value of the property does get modified when the
checkbox is checked. Am I missing something? Thanks.
....
MSI (c) (1C:34) [15:37:25:199]: PROPERTY CHANGE: Adding chkLeft
property.
Its value is 'x'.
....



-- 
View this message in context:
http://n2.nabble.com/Unable-to-read-the-value-of-a-property-associated-w
ith-a-checkbox-from-vbscript-tp1610938p1610938.html
Sent from the wix-users mailing list archive at Nabble.com.


------------------------------------------------------------------------
-
This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the
world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to