[wix-users] Set property from custom action?

Hoover, Jacob Jacob.Hoover at greenheck.com
Wed Jan 6 09:53:10 PST 2021


<InstallExecuteSequence>
<Custom Action="MyCASetLocalAppData" Before="CostFinalize">Not
Installed OR UPGRADINGPRODUCTCODE</Custom>

It only runs in the second sequence, because that's where you told it to run.

https://docs.microsoft.com/en-us/windows/win32/msi/custom-action-execution-scheduling-options


Have a look at firstSequence in

https://wixtoolset.org/documentation/manual/v3/xsd/wix/customaction.html


Also ensure any properties you want to pass from client to server are flagged secure and are defined in all upper case.

https://wixtoolset.org/documentation/manual/v3/xsd/wix/property.html

The one thing I am not certain of is if a directory ref is treated like a secure custom property or not.


From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Alon Dean via wix-users
Sent: Wednesday, January 6, 2021 7:48 AM
To: Nir Bar <nir.bar at panel-sw.com>
Cc: Alon Dean <alondean at gmail.com>; WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Set property from custom action?

CA name is SetLocalAppData_Property
trying to change the path of APPLICATIONFOLDER

Here's the log file:
https://drive.google.com/file/d/1viclPTrTENaJxMoDlwPcGBq865FL7KCQ/view?usp=sharing<https://drive.google.com/file/d/1viclPTrTENaJxMoDlwPcGBq865FL7KCQ/view?usp=sharing>

On Tue, Jan 5, 2021 at 3:11 PM Nir Bar <nir.bar at panel-sw.com<mailto:nir.bar at panel-sw.com>> wrote:

> Can you share the log file?
>
> --
> *Nir Bar*
> *WiX Expert*
>
>
>
> ---- On Tue, 05 Jan 2021 15:03:01 +0200 *Alon Dean <alondean at gmail.com
<mailto:alondean at gmail.com%0b>> <alondean at gmail.com<mailto:alondean at gmail.com>>>* wrote ----
>
> Hi,
> So I still didn't figure this out...
>
> I did what I described, created an immediate CA which sets the value of a
> property I defined, to the console session's local app data path.
> But at the log (running the msi with L*V), it seems this custom action is
> executed only at the second sequence, and the installer still 'thinks' the
> property's value is the default one I configured at the WXS file, and the
> value I set using the CA doesn't affect anything.
>
> I was then advised to create a CA which modifies the DB by inserting
> temporary records to the DB, but from what I understand, this is
> useful mainly to create features, while what I need is to modify the
> value of a property in order to change the install dir path while running.
>
> I can supply a more elaborated explanation with code samples if needed,
>
> Anyone got a suggestion for me?
> I'm really stuck here..
> Thanks!
>
> On Sun, Dec 27, 2020 at 12:46 PM Nir Bar via wix-users <
> wix-users at lists.wixtoolset.org<mailto:wix-users at lists.wixtoolset.org>> wrote:
>
> You got it right, that's the way to do it.
>
> Make sure to schedule the custom action in both UI and Execute sequences
> and run on first sequence only
>
> The property should be in all capital characters
>
>
>
>
> --
>
> Nir Bar
>
> WiX Expert
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/<http://www.firegiant.com>
>
>
>
>

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/<http://www.firegiant.com/>
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.



More information about the wix-users mailing list