Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

PUBLIC PROPERTY in Execute Deferred Sequence

Updated: 21 May 2010 | 8 comments
panneer's picture
0 0 Votes
Login to vote

Hi,

I've read in some documents that Public/Private Property will not be available in Deferred actions.
But in my case, i'm setting the value of one Public Property to Yes/No depending upon the system search in Execute Immediate sequence. Then in Execute Deferred sequence, i'm checking the value of that Public property, if it is No then i'm executing one custom action.
To my surprise, in deferred sequence the Public property condition is passing successfully depending on its value.
We are in the last week of the release, hence i'm some what confused whether the Public property in deferred sequence can be trusted or not.
Please advice.
This is very urgent since we are in the last week of the release.

Thanks for the Help,
Panneer.

Comments

panneer's picture
17
Jul
2009
0 Votes 0
Login to vote

Is it something like Public

Is it something like Public Property can be used for conditioning in Execute Deferred sequence?

Thanks for the Help,
Panneer.

EdT's picture
17
Jul
2009
0 Votes 0
Login to vote

You cannot rely on properties in the deferred sequence

Public properties cannot be relied on in the deferred sequence.
I would recommend you look in MSI.CHM for the property "CustomActionData" which Microsoft provide for the explicit purpose of allowing packagers to pass public properties into the Deferred sequence. Searching on Google for CustomActionData will also undoubtedly reveal many more examples.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

Scot Curry's picture
17
Jul
2009
2 Votes +2
Login to vote

Deferred Custom Action Sequence

There is a very specific set of steps that you go through to pass properties to the deferred sequence.

1)  In the Immediate Sequence you will perform a Set Property custom action.  The name you give the action is not important.  The Property name is very important.  Use the following as an example:

Custom Action Name:  SetPublicProperty
PropertyName:  PropertyForDeferred  <-- Very important will be used in the next step.
Value: [PUBLIC_PROPERTY_VALUE]

2) In the deferred sequence you will do the following (I'm using VBScript as the example Custom Action type).

Custom Action Name:  PropertyForDeferred  <-- Note this is the exact same as the property name above.
VBScript Statement:  vb_script_variable = Session.Property("CustomActionData")

The vb_script_variable will contain the value that was originally stored in PUBLIC_PROPERTY_VALUE.  The only value that you can get in the deferred sequence is CustomActionData like EdT stated above.

Hope that helps.  Talk to you soon,
Scot

Rivin's picture
11
Nov
2009
0 Votes 0
Login to vote

Hi Scot. I tried your

Hi Scot.
I tried your sugestion a couple of times and still could not make it work. It pops up an error message Error 1720
Here is my VBScript:
On Error Resume Next

Dim sPath = Session.Property("CustomActionData")
MsgBox sPath

and here is my log:
MSI (s) (4C:88) [16:13:46:669]: Executing op: ActionStart(Name=PropertyForDeferred,,)
Action 16:13:46: PropertyForDeferred.
MSI (s) (4C:88) [16:13:46:669]: Executing op: CustomActionSchedule(Action=PropertyForDeferred,ActionType=3078,Source=On Error Resume Next

Dim sPath = Session.Property("CustomActionData")

,,CustomActionData=D:\TEST\) //
MSI (s) (4C:5C) [16:13:46:669]: Generating random cookie.
MSI (s) (4C:5C) [16:13:46:685]: Created Custom Action Server with PID 3356 (0xD1C).
MSI (s) (4C:10) [16:13:46:716]: Running as a service.
MSI (s) (4C:10) [16:13:46:716]: Hello, I'm your 32bit Elevated custom action server.
MSI (s) (4C:A8) [16:13:46:716]: Entering MsiProvideComponentFromDescriptor. Descriptor: T{{Z6![j{@?*X@b%V[UUUCM>M5KDYSUnf(HA*L[xeX)y, PathBuf: E3F348, pcchPathBuf: E3F344, pcchArgsOffset: E3F29C
MSI (s) (4C:A8) [16:13:46:716]: MsiProvideComponentFromDescriptor called for component {997FA962-E067-11D1-9396-00A0C90F27F9}: returning harcoded oleaut32.dll value
MSI (s) (4C:A8) [16:13:46:716]: MsiProvideComponentFromDescriptor is returning: 0
DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
Internal Error 2835. ErrorIcon, ErrorDialog
 

AngelD's picture
11
Nov
2009
1 Vote +1
Login to vote

 Try this instead Dim sPath

 Try this instead
Dim sPath : sPath = Session.Property("CustomActionData")
MsgBox sPath

EdT's picture
19
Jul
2009
1 Vote +1
Login to vote

Other properties available in deferred

The ProductCode and UserSID properties, in addition to the CustomActionData property, are the only properties that are accessible at all times during the installation sequences.

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.

VBScab's picture
20
Jul
2009
0 Votes 0
Login to vote

Chaps, I think we may be

Chaps, I think we may be over-complicating this. What you say is absolutely correct, of course, but *only* in the context of an executing script. I *think* the OP was asking if the property was able to be tested in a condition statement, to which the answer is, yes.

Don't know why 'x' happened? Want to know why 'y' happened? Use ProcMon and it will tell you.
Think about using http://www.google.com before posting.

EdT's picture
20
Jul
2009
0 Votes 0
Login to vote

Good point!

VBScab is absolutely correct in that the Public Property holding the condition for the custom action will be evaluated during the time when install scripts are being created (effectively during the immediate sequence), and thus there will be no actual interrogation of the public property when the install scripts are executed and system changes committed (effectively during the deferred sequence).
So in this specific instance, the logic will work as outlined.
Looks like both Scot and I need to read postings a bit more concisely!

If your issue has been solved, please use the "Mark as Solution" link on the most relevant thread.