How to set the list of features which will be installed if the button was pushed?

Estoy usando WixUI_Mondo set. I modified "CompleteButton" button in the SetupTypeDlg:

<Control Id="ServerButton" Type="PushButton" X="40" Y="120" Width="80" Height="17" ToolTip="!(loc.SetupTypeDlgServerButtonTooltip)" Text="!(loc.SetupTypeDlgServerButton)">
   <Publish Property="WixUI_InstallMode" Value="InstallServer">1</Publish>                  
   <Publish Property="SERVICE" Value="[SERVSTR]">1</Publish>
   <Publish Property="ADDLOCAL" Value="Feature1,Feature2,Feature3">1</Publish>
</Control>

<Property Id="ADDLOCAL" Secure="yes"></Property>

Cuando empujo ServerButton el registro dice:

(CLIENT)     MSI (c) (1C:88) [15:28:49:154]: PROPERTY CHANGE: Adding ADDLOCAL property. Its value is 'Feature1,Feature2,Feature3'. 
(UNKNOWN)     Действие 15:28:49: ServStrDlg. Dialog created 
(UNKNOWN)     Действие 15:28:53: ShortsDlg. Dialog created 
(UNKNOWN)     Действие 15:28:55: VerifyReadyDlg. Dialog created 
(CLIENT)     MSI (c) (1C:88) [15:28:55:966]: Note: 1: 2727 2: 
(UNKNOWN)     Действие закончено 15:28:56: WelcomeDlg. Код возврата 1. 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:076]: Doing action: ProgressDlg 
(UNKNOWN)     Действие 15:28:56: ProgressDlg. 
(UNKNOWN)     Начало действия 15:28:56: ProgressDlg. 
(UNKNOWN)     Действие 15:28:56: ProgressDlg. Dialog created 
(UNKNOWN)     Действие закончено 15:28:56: ProgressDlg. Код возврата 1. 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:091]: Doing action: ExecuteAction 
(UNKNOWN)     Действие 15:28:56: ExecuteAction. 
(UNKNOWN)     Начало действия 15:28:56: ExecuteAction. 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:091]: PROPERTY CHANGE: Adding SECONDSEQUENCE property. Its value is '1'. 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:091]: Grabbed execution mutex. 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:091]: Incrementing counter to disable shutdown. Counter after increment: 0 
(CLIENT)     MSI (c) (1C:DC) [15:28:56:091]: Switching to server: NETFRAMEWORK40CLIENT="#1"INSTALLLOCATION="some dir" TARGETDIR="C:\"
 MANUFACTURERDIR="C:\Program Files\..\" CURRENTDIRECTORY="C:\.." CLIENTUILEVEL="0" CLIENTPROCESSID="6684" USERNAME="User" COMPANYNAME=".."
 SOURCEDIR=".." ACTION="INSTALL" EXECUTEACTION="INSTALL" SECONDSEQUENCE="1" ROOTDRIVE="C:\" INSTALLLEVEL="1" ADDLOCAL=Feature4,Feature5,Feature6 

Levels of Feature1,Feature2,Feature3 are more than 3. Can't figure out why it's passing INSTALLLEVEL="1".

UPD:

I made next changes, the result is same. The installer is modifying values of INSTALLLEVEL,ADDLOCAL properties on client-side. On server-side: INSTALLLEVEL=11,ADDLOCAL consists of features with "Level" attribute<=11.

<Control Id="ServerButton" Type="PushButton" X="40" Y="120" Width="80" Height="17" ToolTip="!(loc.SetupTypeDlgServerButtonTooltip)" Text="!(loc.SetupTypeDlgServerButton)">
   <Publish Property="WixUI_InstallMode" Value="InstallServer">1</Publish> 
   <Publish Event="SetInstallLevel" Value="11">1</Publish>                 
   <Publish Property="SERVICE" Value="[SERVSTR]">1</Publish>
   <Publish Property="ADDLOCAL" Value="Feature1,Feature2,Feature3">1</Publish>
</Control>

preguntado el 31 de julio de 12 a las 12:07

2 Respuestas

Yo leo esto artículo many times and finally found: i have to publish Event='AddLocal' no es un Property. Thank's, Yan, for your time very much. Aquí está el código de trabajo:

<Control Id="ServerButton" Type="PushButton" X="40" Y="120" Width="80" Height="17" ToolTip="!(loc.SetupTypeDlgServerButtonTooltip)" Text="!(loc.SetupTypeDlgServerButton)">
   <Publish Property="WixUI_InstallMode" Value="InstallServer">1</Publish>                  
   <Publish Property="SERVICE" Value="[SERVSTR]">1</Publish>
   <Publish Event="AddLocal" Value="ALL">1</Publish>
   <Publish Event="Remove" Value="Feature4">1</Publish>
   <Publish Event="Remove" Value="Feature5">1</Publish> 
   <Publish Event="Remove" Value="Feature6">1</Publish>
</Control>

And I added an event to the "Back" button of the next dialog:

<Control Id="Back" Type="PushButton" X="192" Y="243" Width="56" Height="17" Text="!(loc.WixUIBack)">
   <Publish Event="SetInstallLevel" Value="3">WixUI_InstallMode="InstallServer"</Publish>
</Control>

Respondido 14 ago 12, 07:08

It's great you've found it out finally! - Yan Sklyarenko

Según el Documentación de MSDN, the installation level specified by the INSTALLLEVEL property can be overridden by a number of properties, including ADDLOCAL. Hence, as far as I understand it, even if INSTALLLEVEL se establece a 1, it gets overriden by the ADDLOCAL property and is not taken into consideration by the Windows Installer.

If you experience any error or wrong behavior related to this, add more details about it to your question.

Respondido 01 ago 12, 07:08

I found the related article from Bob here: joyofsetup.com/2007/05/30/feature-conditions-and-ui. I'm doing the same as described in. Or not? The log doesn't indicate any error. According the log-file,installer sets ADDLOCAL="Feature1,Feature2,Feature3" as is required. May be it is too late to set this property..Can't understand - Nerielle

No error in the log, but what about the behavior? Is it what you expected or not? - Yan Sklyarenko

No,it installs features with INSTALLLEVEL=1 - it uses the default value. i don't set it anywhere. I expect that it will use the new value of ADDLOCAL property. But it doesn't - Nerielle

El original CompleteButton publishes the event SetInstallLevel, que establece el INSTALLLEVEL a 1000: <Publish Event="SetInstallLevel" Value="1000">1</Publish> Are you missing this in your changes CompleteButton ¿control? - Yan Sklyarenko

Yes, I had deleted this row. I have no SetInstallLevel action inside my control element - Nerielle

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.