[wix-users] Passing parameters to in-script custom actions

Skildum, Mat Mathew.Skildum at Aspect.com
Wed Aug 24 06:15:12 PDT 2016


What you are describing sounds like your properties are not set as global and are not getting passed to the execute sequence.  The UI sequence to the execute sequence which are done as two separate processes and the transition will cause local properties to be lost.  This is circumvented be setting the Secure tag when the property is being defined as this tells MSI to pass this property across the boundary.  You will see this transition in the installation log along with the properties being passed through.

Usually you set custom action properties in the execute sequence as an immediate action using a local property that matches the custom action name.  This avoids the loss of the property value and makes it easier to track what is getting set where in the log file.

Mat Skildum


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Vanniekerk, Tyrel (GE Healthcare)
Sent: Wednesday, August 24, 2016 8:00 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Passing parameters to in-script custom actions

I thought that was what I was doing?  The UpdateRemotingConfigFile.SetProperty being set and then being used in session.CustomActionData?  I did everything it says to do.  I update the property as soon as I have the correct values to put in there, while still in the UI stage, then when the custom action gets called and session properties are no longer available, the CustomActionData contains data, but it only contains data as it was when the install started.  If I set the property at the start of the install, that is the value it ends up with when it gets passed to the custom action, not the value that was changed once the user had entered their data.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Robert Goodridge
Sent: Tuesday, August 23, 2016 5:54 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

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 https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwIFAw&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=iso4oc6YFG6erwBh_HhIk_inOON2kMnYGJPE5sNhhOc&s=5pKv0k-3aouXansMjrmO-5D39q8gZ3eTiBoYGRYd1wQ&e=

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant https://urldefense.proofpoint.com/v2/url?u=http-3A__www.firegiant.com_&d=CwIFAw&c=IV_clAzoPDE253xZdHuilRgztyh_RiV3wUrLrDQYWSI&r=oAJIeMTNC3Z6LlnozAjna4bWEZCGLInzcwB6EkZAFeU&m=iso4oc6YFG6erwBh_HhIk_inOON2kMnYGJPE5sNhhOc&s=5pKv0k-3aouXansMjrmO-5D39q8gZ3eTiBoYGRYd1wQ&e=

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
This email (including any attachments) is proprietary to Aspect Software, Inc. and may contain information that is confidential. If you have received this message in error, please do not read, copy or forward this message. Please notify the sender immediately, delete it from your system and destroy any copies. You may not further disclose or distribute this email or its attachments.


More information about the wix-users mailing list