cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
victorcamp
Level 3

Help! Deferred Execution Custom Action

I want a custom property that's set in the user interface section, then used later during the installation. I know I have to make use of CustomActionData, but that requires manually altering several tables in the MSI (I have Orca to do that).

My script runs fine during the UI section, and sets a property called IS_UPGRADE. I've put this Custom Action (called PreExistingData1) "After Database Folder dialog". I've added the property to the Property table, and also included it in SecureCustomProperties (ISACTIONPROP1;IS_UPGRADE) within the same table.

Now comes the hard part. What I want to do is called Deferred Execution Custom Action (kb: Q104413). Since the Custom Action Wizard isn't available in Express, I have to add records to 2 other tables manually (so I'm told): CustomAction and InstallExecuteSequence. Nothing I've tried so far works. When I run the Custom Action later (called PreExistingData2) "After File Transfer", I can't get that property, nor any other I need.

Here's what I've tried:
Added record to CustomAction table:
Action: MakeIS_UPGRADEAvailable
Type: 51
Source: PreExistingData1
Target: [IS_UPGRADE];[INSTALLDIR];[ProductVersion]
(I need the other 2 properties as well)
Added record to InstallExecuteSequence:
Action: PreExistingData1
Condition:
Sequence: 412
(LaunchConditions is 410, another item is 411)

When PreExistingData2 is run, I have these lines:
[code]
PropArray = Split(Session.Property("CustomActionData"), ";")
strIS_UPGRADE = PropArray(0)
strInstallDir = PropArray(1)
strVer1 = PropArray(2)
[code end]

All 3 variables come up empty, and it doesn't error (both Custom Actions are set: Ignore Exit Code = No).

How do I get those values available?
Labels (1)
0 Kudos
(3) Replies
MichaelU
Level 12 Flexeran
Level 12 Flexeran

The CustomActionData for any deferred action is read from a stored copy of the property with the custom action's name. If I'm reading correctly, you've set the data for PreExistingData1 and not finding it for PreExistingData2. If so, you just need to modify the current (or add another) set-a-property for PreExistingData2.
0 Kudos
victorcamp
Level 3

In PreExistingData2, I want to read the data previously (hopefully) saved. I'm not setting any properties in PreExistingData2. The fact that reading CustomActionData from within ..2 does not error when parsed as an array, tells me the "fields" are there, just not filled with anything. I seem to be missing the point at which those "fields" (INSTALLDIR, ProductVersion, and my IS_UPGRADE) actually get values. I thought that was the purpose of the new entry in the CustomAction table called MakeIS_UPGRADEAvailable.

Can you explain a little more?
0 Kudos
Cromagnon35
Level 4

I've found it simple to set such properties to a registry location, then read them back in during deferred. if you want, you can always use another action to delete the registry entry.
0 Kudos