PDA

View Full Version : SUPPORTDIR from custom action



burked
12-20-2004, 01:45 PM
I'm creating a c++ custom action from an MSI dll and i cannot seem to retrieve the SUPPORTDIR folder from the install. It always returns empty.

I had read in an InstallShield X thread this was possible if there were no files in the Support Files area in the IDE, but I have the file I am trying to launch in here. This works from an InstallScript Custom Action, but not a C++ custom action.

Any ideas?

thanks,

Daren

TsungH
12-20-2004, 02:13 PM
For an example of using SUPPORTDIR in C++ custom action, please refer to this FAQ (http://helpnet.installshield.com/Robo/BIN/Robo.dll?tpc=/robo/projects/InstallShieldXFAQ/FAQCustomActionsSupportdir.htm).

The information on your custom action isn't complete. If it is a deferred custom action, please note that only a limited set of properties is available during Deferred Execute Sequence. You will need to use CustomActionData property. For information, please refer to Obtaining Context Information for Deferred Execution Custom Actions (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/obtaining_context_information_for_deferred_execution_custom_actions.asp).

burked
12-20-2004, 02:24 PM
Quite right. I forgot to specify the deferred property of the Custom Action.

Using the CustomActionData property works for the deferred action.

thanks,

Daren

emcknight
12-30-2004, 05:15 PM
Is my understanding correct that the "SETUPEXEDIR" property is available only through a C++ DLL and cannot be accessed using VB Script? Everything I've read so far points me in that direction, but I wanted to be sure.

TsungH
12-30-2004, 05:55 PM
No, it is not correct. You can use SETUPEXEDIR property in a VBScript custom action, similar to what is demonstrated in the FAQ mentioned in my prior post. There are limitations on SETUPEXEDIR property. For the limitations, please look up SETUPEXEDIR in InstallScript Language Reference. The same restriction on properties in deferred custom actions applies.