Use Radio button to control custom action

4 messages Options
Embed this post
Permalink
Chunyan

Use Radio button to control custom action

Reply Threaded More More options
Print post
Permalink
Hi wix-users,
 
I have one dialog, which has two radion buttons. I want to use this
radio button to decide custom action to be called or not.
 
<Control Type="RadioButtonGroup" Property="DoCA" Id="Upgrade" Width="50"
Height="42" X="68" Y="100">

<RadioButtonGroup Property="DoCA">

<RadioButton Value ="DoIt" Text="New" Height="17" Value="0" Width="50"
X="0" Y="0" />

<RadioButton Value ="NotDoIt" Text="Upgrade" Height="17" Value="1"
Width="50" X="0" Y="25" />

</RadioButtonGroup>

</Control>

I want "MyCA" to run when RadioButton "DoIt" is checked. So the custom
action is defined as:

<CustomAction Id="MyCA" Property="DoCA" Value="DoIt" FileKey="MyCA.exe"
ExeCommand="Call MyCA" Return="asyncWait" />

However, I got the compile error:

d:\InstallDirDlg.wxs(52,0): error CNDL0022: The CustomAction/@FileKey
attribute cannot coexist with a previously specified attribute on this
element. The CustomAction element may only have one of the following
source attributes specified at a time: BinaryKey, Directory, FileKey,
Property, or Script.

How to modify the custom action to avoid this error?

 

Best regards,

 

Chunyan

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Chunyan

Re: Use Radio button to control custom action

Reply Threaded More More options
Print post
Permalink
I modified the custom action as:

 <CustomAction Id="MyCA" FileKey="MyCA.exe" ExeCommand="Call MyCA" Return="asyncWait" />

And define the property for Radio button as:
<Property Id="DoCA">DoIt</Property>

And  I call custom action as:

<Custom Action="MyCA" After="InstallFinalize">DoCA="DoIt"</Custom>

However, when I run the setup, whatever I select radio button "DoIt" or "NotDoIt", the custom action always runs.

Is there something wrong above that I define the property or custom action condition?


Best regards,

Chunyan



-----Ursprüngliche Nachricht-----
Von: Jiang, Chunyan (GE Healthcare)
Gesendet: Freitag, 30. Oktober 2009 11:35
An: General discussion for Windows Installer XML toolset.
Betreff: [WiX-users] Use Radio button to control custom action

Hi wix-users,
 
I have one dialog, which has two radion buttons. I want to use this radio button to decide custom action to be called or not.
 
<Control Type="RadioButtonGroup" Property="DoCA" Id="Upgrade" Width="50"
Height="42" X="68" Y="100">

<RadioButtonGroup Property="DoCA">

<RadioButton Value ="DoIt" Text="New" Height="17" Value="0" Width="50"
X="0" Y="0" />

<RadioButton Value ="NotDoIt" Text="Upgrade" Height="17" Value="1"
Width="50" X="0" Y="25" />

</RadioButtonGroup>

</Control>

I want "MyCA" to run when RadioButton "DoIt" is checked. So the custom action is defined as:

<CustomAction Id="MyCA" Property="DoCA" Value="DoIt" FileKey="MyCA.exe"
ExeCommand="Call MyCA" Return="asyncWait" />

However, I got the compile error:

d:\InstallDirDlg.wxs(52,0): error CNDL0022: The CustomAction/@FileKey attribute cannot coexist with a previously specified attribute on this element. The CustomAction element may only have one of the following source attributes specified at a time: BinaryKey, Directory, FileKey, Property, or Script.

How to modify the custom action to avoid this error?

 

Best regards,

 

Chunyan

------------------------------------------------------------------------------
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Rob Mensching-7

Re: Use Radio button to control custom action

Reply Threaded More More options
Print post
Permalink
I think your Property needs to be marked Secure="yes" to be passed from the
UI sequence to the install sequence. If you look in a verbose log file it
should show you the value of your Property changing which is extremely
helpful debugging these sorts of things. Just follow the Property name
through the log.

On Fri, Oct 30, 2009 at 4:37 AM, Jiang, Chunyan (GE Healthcare) <
[hidden email]> wrote:

> I modified the custom action as:
>
>  <CustomAction Id="MyCA" FileKey="MyCA.exe" ExeCommand="Call MyCA"
> Return="asyncWait" />
>
> And define the property for Radio button as:
> <Property Id="DoCA">DoIt</Property>
>
> And  I call custom action as:
>
> <Custom Action="MyCA" After="InstallFinalize">DoCA="DoIt"</Custom>
>
> However, when I run the setup, whatever I select radio button "DoIt" or
> "NotDoIt", the custom action always runs.
>
> Is there something wrong above that I define the property or custom action
> condition?
>
>
> Best regards,
>
> Chunyan
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Jiang, Chunyan (GE Healthcare)
> Gesendet: Freitag, 30. Oktober 2009 11:35
> An: General discussion for Windows Installer XML toolset.
> Betreff: [WiX-users] Use Radio button to control custom action
>
> Hi wix-users,
>
> I have one dialog, which has two radion buttons. I want to use this radio
> button to decide custom action to be called or not.
>
> <Control Type="RadioButtonGroup" Property="DoCA" Id="Upgrade" Width="50"
> Height="42" X="68" Y="100">
>
> <RadioButtonGroup Property="DoCA">
>
> <RadioButton Value ="DoIt" Text="New" Height="17" Value="0" Width="50"
> X="0" Y="0" />
>
> <RadioButton Value ="NotDoIt" Text="Upgrade" Height="17" Value="1"
> Width="50" X="0" Y="25" />
>
> </RadioButtonGroup>
>
> </Control>
>
> I want "MyCA" to run when RadioButton "DoIt" is checked. So the custom
> action is defined as:
>
> <CustomAction Id="MyCA" Property="DoCA" Value="DoIt" FileKey="MyCA.exe"
> ExeCommand="Call MyCA" Return="asyncWait" />
>
> However, I got the compile error:
>
> d:\InstallDirDlg.wxs(52,0): error CNDL0022: The CustomAction/@FileKey
> attribute cannot coexist with a previously specified attribute on this
> element. The CustomAction element may only have one of the following source
> attributes specified at a time: BinaryKey, Directory, FileKey, Property, or
> Script.
>
> How to modify the custom action to avoid this error?
>
>
>
> Best regards,
>
>
>
> Chunyan
>
>
> ------------------------------------------------------------------------------
> 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
> [hidden email]
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


--
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users
Chunyan

Re: Use Radio button to control custom action

Reply Threaded More More options
Print post
Permalink
Hi Rob,

Thanks a lot! I set Secure="yes" to that property. And the condition for CA works. So my problem is resolved.


Regards,

Chunyan

-----Ursprüngliche Nachricht-----
Von: Rob Mensching [mailto:[hidden email]]
Gesendet: Freitag, 30. Oktober 2009 17:00
An: General discussion for Windows Installer XML toolset.
Betreff: Re: [WiX-users] Use Radio button to control custom action

I think your Property needs to be marked Secure="yes" to be passed from the UI sequence to the install sequence. If you look in a verbose log file it should show you the value of your Property changing which is extremely helpful debugging these sorts of things. Just follow the Property name through the log.

On Fri, Oct 30, 2009 at 4:37 AM, Jiang, Chunyan (GE Healthcare) < [hidden email]> wrote:

> I modified the custom action as:
>
>  <CustomAction Id="MyCA" FileKey="MyCA.exe" ExeCommand="Call MyCA"
> Return="asyncWait" />
>
> And define the property for Radio button as:
> <Property Id="DoCA">DoIt</Property>
>
> And  I call custom action as:
>
> <Custom Action="MyCA" After="InstallFinalize">DoCA="DoIt"</Custom>
>
> However, when I run the setup, whatever I select radio button "DoIt"
> or "NotDoIt", the custom action always runs.
>
> Is there something wrong above that I define the property or custom
> action condition?
>
>
> Best regards,
>
> Chunyan
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: Jiang, Chunyan (GE Healthcare)
> Gesendet: Freitag, 30. Oktober 2009 11:35
> An: General discussion for Windows Installer XML toolset.
> Betreff: [WiX-users] Use Radio button to control custom action
>
> Hi wix-users,
>
> I have one dialog, which has two radion buttons. I want to use this
> radio button to decide custom action to be called or not.
>
> <Control Type="RadioButtonGroup" Property="DoCA" Id="Upgrade" Width="50"
> Height="42" X="68" Y="100">
>
> <RadioButtonGroup Property="DoCA">
>
> <RadioButton Value ="DoIt" Text="New" Height="17" Value="0" Width="50"
> X="0" Y="0" />
>
> <RadioButton Value ="NotDoIt" Text="Upgrade" Height="17" Value="1"
> Width="50" X="0" Y="25" />
>
> </RadioButtonGroup>
>
> </Control>
>
> I want "MyCA" to run when RadioButton "DoIt" is checked. So the custom
> action is defined as:
>
> <CustomAction Id="MyCA" Property="DoCA" Value="DoIt" FileKey="MyCA.exe"
> ExeCommand="Call MyCA" Return="asyncWait" />
>
> However, I got the compile error:
>
> d:\InstallDirDlg.wxs(52,0): error CNDL0022: The CustomAction/@FileKey
> attribute cannot coexist with a previously specified attribute on this
> element. The CustomAction element may only have one of the following
> source attributes specified at a time: BinaryKey, Directory, FileKey,
> Property, or Script.
>
> How to modify the custom action to avoid this error?
>
>
>
> Best regards,
>
>
>
> Chunyan
>
>
> ----------------------------------------------------------------------
> -------- 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
> [hidden email]
> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>


--
virtually, Rob Mensching - http://RobMensching.com LLC
------------------------------------------------------------------------------
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wix-users