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
- :
- Re: Accessing INSTALLDIR in 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
‎Apr 12, 2010
05:01 PM
Accessing INSTALLDIR in deferred custom action
How do I get the installation destination path in a deferred custom action for a Basic MSI project? I'm trying to get the value of INSTALLDIR, but I just get an empty string. Is there a simple way to do this?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 12, 2010
05:55 PM
Hi,
I'm pretty new to InstallShield but I just implemented what you'd like to do. What I did was create a property and then I set that property to INSTALLDIR in a custom action. I then accessed this property in an InstallScript using the MsiGetProperty with "CustomActionData" parameter. The key in implementing this is to name your InstallScript function that same as your property.
I hope this helps.
Anthony
I'm pretty new to InstallShield but I just implemented what you'd like to do. What I did was create a property and then I set that property to INSTALLDIR in a custom action. I then accessed this property in an InstallScript using the MsiGetProperty with "CustomActionData" parameter. The key in implementing this is to name your InstallScript function that same as your property.
I hope this helps.
Anthony
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2010
07:49 AM
The following help topic has more details:
Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions
Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2010
12:16 PM
Okay thanks. It was a bit confusing, but I eventually got it to work.
But what if I wanted to get both INSTALLDIR and SUPPORTDIR for use in the same InstallScript function? I believe I saw a help article on doing this in VBScript using arrays. Would I do it similarly in InstallScript? What would I name the Custom Action since I am getting more than one property?
Thanks
But what if I wanted to get both INSTALLDIR and SUPPORTDIR for use in the same InstallScript function? I believe I saw a help article on doing this in VBScript using arrays. Would I do it similarly in InstallScript? What would I name the Custom Action since I am getting more than one property?
Thanks
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 13, 2010
01:25 PM
Actually, I figured it out using lists. Thanks again.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)