This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Using INSTALLDIR in a Deferred Custom Action
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 10, 2009
05:37 PM
Using INSTALLDIR in a Deferred Custom Action
I need to run an exe after an installation completes. Currently, I have a deferred custom action that runs just before the InstallFinalize action. I've followed the steps here: http://helpnet.acresso.com/robo/projects/installshield12helplib/AccessingProps-DeferredCAs.htm to use the CustomActionData to pass the INSTALLDIR to my Custom Action. However, this tutorial only shows you how to display the INSTALLDIR. I need to store it and use it in my Custom Action's function. What is the best way to do this? If I follow the tutorial and create a set-a-property Action to set the value of INSTALLDIR, it always winds up empty if I try to access via:
It seems that knowing the INSTALLDIR in a deferred custom action has to be a common thing for people to do. Am I going about this the entirely wrong way?
string installDir;
number length = MAX_PATH;
MsiGetProperty(hMSI, "CustomActionData", installDir, length);
It seems that knowing the INSTALLDIR in a deferred custom action has to be a common thing for people to do. Am I going about this the entirely wrong way?
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2009
07:26 AM
The example shown at http://helpnet.acresso.com/robo/projects/installshield12helplib/AccessingProps-DeferredCAs.htm is related to the "SUPPORTDIR" property. It seems that this "SUPPORTDIR" property is only set you have added some support files.
If you haven't got any support file, it returns an empty string.
But you are trying to get the value of the "INSTALLDIR" property.
Did you make sure that the Custom Action that sets the property has got a Property Value of [INSTALLDIR], including the brackets?
Its property name must correspond to the name of the custom action that will use this custom action data.
If you haven't got any support file, it returns an empty string.
But you are trying to get the value of the "INSTALLDIR" property.
Did you make sure that the Custom Action that sets the property has got a Property Value of [INSTALLDIR], including the brackets?
Its property name must correspond to the name of the custom action that will use this custom action data.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 12, 2009
10:07 AM
Its property name must correspond to the name of the custom action that will use this custom action data.
Yeah that's where I was screwing up. I finally noticed the text in the help files that mentioned this. Problem solved.
Thanks for the help.