PDA

View Full Version : CustomActionData and a custom property



Alex_LucID
11-23-2009, 12:24 PM
Hi,

I have my version of a SetupType dialog that has three options:
- Standalone
- NetworkApplication
- NetworkClient

A property (to manage this radio group) is called _IsSetupTypeMin.

How can I pass this property to a CustomActionData property so I could access setup type property in my InstallScript custom action?

I know how to pass for example an INSTALLDIR property - it works great. But what about a custom property - _IsSetupTypeMin for example?

Cheers,
Alex

Kelter
11-23-2009, 03:31 PM
you can pass any property into CustomActionData, so your custom property will work just as well. My "Set a property" events that set the customactiondata for any of the deferred custom actions pass properties like this:


INSTALLDIR=[INSTALLDIR];APPDATA=[LocalAppDataFolder];RF=[ISReleaseFlags];_IsSetupTypeMin=[_IsSetupTypeMin]

I've created some InstallScript functions which facilitate getting values out of the delimited list.

Alex_LucID
11-24-2009, 07:47 AM
Thanks this works great!

but I have another problem - where should I place my SetProperty custom action?

I placed it after InstallInitialize and my _IsSetupTypeMin has always a default value (Standalone) in CustomActionData property. even when user selects NetworkInstall for example.

Kelter
11-24-2009, 10:27 AM
my "set a property" actions that set the CA data for a deferred execution CA are sequenced just before their respective deferred actions*.

on that note, my other set a property CAs are sequenced after their data are known, and my set a directory CAs are all sequenced after costfinalize.

----------
*"Set a prop" actions are immediate execution actions, so they will run while the setup script is being written. this implies that the values being passed via "CustomActionData" are the values that exist before the actual execution of the script. See http://www.installsite.org/pages/en/isnews/200108/index.htm for more on sequencing CAs.

Alex_LucID
11-27-2009, 07:48 AM
my "set a property" actions that set the CA data for a deferred execution CA are sequenced just before their respective deferred actions*.

on that note, my other set a property CAs are sequenced after their data are known, and my set a directory CAs are all sequenced after costfinalize.

----------
*"Set a prop" actions are immediate execution actions, so they will run while the setup script is being written. this implies that the values being passed via "CustomActionData" are the values that exist before the actual execution of the script. See http://www.installsite.org/pages/en/isnews/200108/index.htm for more on sequencing CAs.

Thanks, added second property and SetProperty custom action at start and then used it in my main Custom SetProperty - works great :)