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: INSTALLDIR In Exec. Seq
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
‎Dec 17, 2008
07:39 AM
INSTALLDIR In Exec. Seq
Hi!
I've searched the forum for answers but I didn't manage to find out how to access the INSTALLDIR from an InstallScript CA scheduled in Exec Seq after InstallFiles.
I want to know the install dir when I execute a program installed with our product. The ability for the user to change the install dir is included (DestinationFolder dialog). I'm using the this call to read the INSTALLDIR.
MsiGetProperty(hMSI,"INSTALLDIR",appPath,valueBuf);
I've also added the INSTALLDIR to the property: "SecureCustomProperties" but that didn't seem to work either.
I've also tried (as proposed on a forum post) to use a Set Property CA. I set this property: NEWFOLDER and set it's value to: [INSTALLDIR]. It was scheduled after "InstallWelcome". This did not work. :mad:
Thanks,
Lars-Erik Lis
I've searched the forum for answers but I didn't manage to find out how to access the INSTALLDIR from an InstallScript CA scheduled in Exec Seq after InstallFiles.
I want to know the install dir when I execute a program installed with our product. The ability for the user to change the install dir is included (DestinationFolder dialog). I'm using the this call to read the INSTALLDIR.
MsiGetProperty(hMSI,"INSTALLDIR",appPath,valueBuf);
I've also added the INSTALLDIR to the property: "SecureCustomProperties" but that didn't seem to work either.
I've also tried (as proposed on a forum post) to use a Set Property CA. I set this property: NEWFOLDER and set it's value to: [INSTALLDIR]. It was scheduled after "InstallWelcome". This did not work. :mad:
Thanks,
Lars-Erik Lis
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
08:28 AM
Basic question - did you set the buffersize (valueBuf) before you made the MsiGetProperty call? What did you get back?
When you included the Set Property CA, did you log the install? Again, what value, if any, was returned?
When you included the Set Property CA, did you log the install? Again, what value, if any, was returned?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
08:52 AM
Thanks for the reply Kathy.
I forgot to mention that the CA that reads the INSTALLDIR property has the "In-Script Execution" set to "Deferred Execution in System Context".
I did set the valueBuf and the value I got back was nothing -> ""
I didn't log the install when running the Set Prop. CA but the result was the same: ""
I forgot to mention that the CA that reads the INSTALLDIR property has the "In-Script Execution" set to "Deferred Execution in System Context".
I did set the valueBuf and the value I got back was nothing -> ""
I didn't log the install when running the Set Prop. CA but the result was the same: ""
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
09:00 AM
Deferred custom actions do not have access to most properties. You'd need to use the CustomActionData property, as explained in the following help topic:
Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions
(Please note that the property name that you enter for step 1 in that procedure must match the name of the custom action that you create in step 4.)
I hope that helps.
Accessing or Setting Windows Installer Properties Through Deferred, Commit, and Rollback Custom Actions
(Please note that the property name that you enter for step 1 in that procedure must match the name of the custom action that you create in step 4.)
I hope that helps.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Dec 17, 2008
09:12 AM
DebbieL:
Thanks a bunch! It worked out great...
I made the changes listed on that link you gave me.
Thanks a bunch! It worked out great...
I made the changes listed on that link you gave me.
![](/skins/images/D60DF682EA37BF37032955CE10F3F0BB/responsive_peak/images/icon_anonymous_message.png)