[wix-users] Passing parameters to in-script custom actions
Robert Goodridge
robert.goodridge at lansa.com.au
Tue Aug 23 15:53:30 PDT 2016
It looks to me like it's a deferred custom action. They require Custom Action Data to be set. There is documentation on this.
Warm regards
Rob Goodridge | CloudArchitect | LANSA Product Centre
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Vanniekerk, Tyrel (GE Healthcare)
Sent: Wednesday, 24 August 2016 12:43 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Passing parameters to in-script custom actions
So I added the following:
<Publish Dialog="ServerForm" Property="UpdateRemotingConfigFile.SetProperty" Control="NextButton"
Value="INSTALLFOLDER=[INSTALLFOLDER];SERVER_NAME=[SERVER_NAME];SERVER_PORT=[SERVER_PORT]" Order="1">1</Publish>
And in the log file I see:
MSI (c) (94:D0) [09:37:42:311]: PROPERTY CHANGE: Adding UpdateRemotingConfigFile.SetProperty property. Its value is 'INSTALLFOLDER=C:\Program Files (x86)\MyApp\;SERVER_NAME=localhost;SERVER_PORT=8001'.
But when the action is called:
MSI (s) (D4:DC) [09:37:51:244]: Executing op: ActionStart(Name=UpdateRemotingConfigFile,,)
Action 9:37:51: UpdateRemotingConfigFile.
MSI (s) (D4:DC) [09:37:51:245]: Executing op: CustomActionSchedule(Action=UpdateRemotingConfigFile,ActionType=1025,Source=BinaryData,Target=UpdateRemotingConfigFile,)
MSI (s) (D4:50) [09:37:51:248]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI53FD.tmp, Entrypoint: UpdateRemotingConfigFile
SFXCA: Extracting custom action to temporary directory: C:\Windows\Installer\MSI53FD.tmp-\
SFXCA: Binding to CLR version v4.0.30319 Calling custom action CustomActions!CustomActions.CustomActions.UpdateRemotingConfigFile
The initial value of UpdateRemotingConfigFile.SetProperty (empty or null) is used.
It does not make sense, the property is being set, but it uses the initial value?
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Vanniekerk, Tyrel (GE Healthcare)
Sent: Tuesday, August 23, 2016 8:00 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: EXT: [wix-users] Passing parameters to in-script custom actions
I will give it a try, thanks. I uses a custom action to do it and it does set the property, the property just never gets updated when sent to the deferred custom action.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of sampat magi
Sent: Monday, August 22, 2016 6:51 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: EXT: Re: [wix-users] Passing parameters to in-script custom actions
For setting a property to a value, which is again a property/properties , please use <SetProperty/>
Sampat
On 23-Aug-2016 12:07 am, "Vanniekerk, Tyrel (GE Healthcare)" < tyrel.vanniekerk at ge.com> wrote:
> Hi,
>
> I have a custom action with Execute=commit running Before
> InstallFinalize. The action gets called and at this point I have to
> use session. CustomActionData to get parameters to the custom action.
> I created a property with the same name as the custom action and added
> some text in there for the properties. Initially I tried to add some
> property references in there like [INSTALLFOLDER], but the text just
> came through with the brackets. Then I added a custom action to set
> the property to the correct value on the Next button of the dialog
> that sets the values and I can see the property being set to the
> correct value, but when the custom action is run, the text sent to
> CustomActionData is whatever it was set to at the start of the install.
>
> What's the correct way to send data consisting of property values to
> an in-script custom action?
>
> Thanks.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_
> &d=CwICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6
> LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=4FpWRWrV2SuKvq1iUeDLQDNUhAsB-5dGxmVt
> 5eLje1s&s=eBcK7lc7IMG69wJc8Jdd-KxLh8m_t6FECBJhJULDs48&e=
>
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=4FpWRWrV2SuKvq1iUeDLQDNUhAsB-5dGxmVt5eLje1s&s=eBcK7lc7IMG69wJc8Jdd-KxLh8m_t6FECBJhJULDs48&e=
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwICAg&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=sWnDmKllPEwibuqM9faPersoDzJ64imb0NyL_WzCMTo&s=103pWqklFY0zgpuuPo4P1maL6OiCO6cT-ag3EDR5bjE&e=
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list