cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
danieluc
Level 6

Rollback CA can't access variables

Hi,

I'm using Install Shield 2008 Premier, and run into a bit of a problem. I have a Custom Action for which I must set a rollback one (type 1318 vbScript, In-Script Execution = Rollback Execution), but need the INSTALLDIR given by the user at install time.
Tried to access the INSTALLDIR two ways:

"
installDir = Session.Property("INSTALLDIR")
"

and

"
propArray = Split(Session.Property("CustomActionData"), ";")
installDir = propArray(0)
--and have a MSI CA (type 51) with the same mane as property name and value [INSTALLDIR] --
"

but both return a empty value for the installDir.
How can I access the INSTALLDIR on the rollback action?

Thanks,
Daniell
Labels (1)
0 Kudos
(2) Replies
Christopher_Pai
Level 16

danieluc wrote:
--and have a MSI CA (type 51) with the same mane as property name and value [INSTALLDIR] --


The Type 51 has to be scheduled before the rollback CA and the name of the property being set has to match the name of the deferred CA. As an aside, other then directory names like INSTALLDIR, all other PUBLIC properties being referenced should be added to the SecureCustomProperties property to avoid problems in UAC/Managed/Elevated installation scenarios.
0 Kudos
danieluc
Level 6

Hi Chris,

Thanks alot, now it works as expected. I can't believe that I missed only the right place in the sequence; so close 🙂

Thanks again :beer:
Daniell
0 Kudos