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

Property set in dialog doesn't change value when accessed from execute seq deferred

(IS 2009, Basic MSI, InstallScript)

Hi, I have the following problem. I have an CA (InstallScript function) that needs to run after the files have been copied to the filesystem, lets call it "InstallMyFiles". I have put the script to run deferred after the "DuplicateFiles" sequence in the Execute sequence so the files have been copied to the file system before trying to run my script.

I also have a set property which is run after InstallInitialize seq of the Execute seq that sets properties which are used by my deferred script function, lets call it "PropertyBag", the actual name is "InstallMyFiles" so I can access the contents when "InstallMyFiles" runs.

I also have a dialog which I created via the Dialog Wizard "Interior Wizard Panel". The user needs to pick one of three radio buttons in a radio button group and I need to have access to that information when my deferred script runs.

My problem is that I am not able to access the values from the dialog when my deferred script executes, it will just use the default values from the Property Manager for the property I'm interested in. If I run a different CA (InstallScript) from the dialog when the user clicks on the next button like this:

Event Argument Condition
DoAction MyFunction 1

I can access the correct values by calling MsiGetProperty from my CA. I have also tried to call MsiSetProperty to set the value again from my CA and to call CustomActionData so I can access it later but it does not seem to make any difference.

My set property has the value: [SPScopeGroup]
It always returns 1 which is the default in the Property Manager. If I remove the default value from the Property Manager, it returns just blank.

I have also tried just having an EditButton instead but same result, only the default value will be returned when my deferred script runs.

Any idea what I am doing wrong or what I should check next?

TIA,
Magnus
Labels (1)
0 Kudos
(3) Replies
RobertDickau
Flexera Alumni

If you want a property in the UI sequence to be available in the Execute sequence, you'll need to use a public property (one with an all-caps name: PROPERTYBAG and not PropertyBag), and make sure the name PROPERTYBAG is set in the value of SecureCustomProperties (the dialog editor should do this for you).

And yes, for deferred actions you'll need to go through CustomActionData.
0 Kudos
texmags
Level 3

Thank you, that worked beautifully!

-Magnus
0 Kudos
RobertDickau
Flexera Alumni

Good news! As an aside, if you have the Premier edition, InstallShield Best Practice rule ISBP04 will catch this situation...
0 Kudos