Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Reading Property in Custom Action


2 replies to this topic

buckelfliege

buckelfliege
  • Members
  • 6 posts

Posted 26 April 2002 - 07:27

Hi,

I'm using ISD 7.02 and created a Standard Project.
I've created a Custom Action as VBScript and inserted it in the Installation\Execute Sequence, just before the OnInstallFilesActionBefore Action. Inside this Action I read a property like
strInstDir = Session.Property("INSTALLDIR").
This works fine, as long I've selected "Immediate Execution" for this custom action. If I select "Deferred Execution" the returned property is always emty whatever position in the sequence I choose.

Is it not possible to read properties, if execution is deferred ???

Greetings
Achim

buckelfliege

buckelfliege
  • Members
  • 6 posts

Posted 26 April 2002 - 10:50

OK,

finally I found it in the Windows Installer Help.
-----
....This means that the session handle and property data set during the installation sequence are not available to a deferred execution custom action......
-----


Greetings
Achim

Leigh Ravenhall

Leigh Ravenhall
  • Members
  • 269 posts

Posted 29 April 2002 - 01:06

To retrieve properties in a deferred execution custom action (excluding InstallScript actions), you need to set property values in an immediate execution custom action to the name of your custom action.

For example, if I had a custom action called MyAction, in an immediate execution custom action, I would set a property called MyAction to INSTALLDIR.  Then, in the deferred custom action called MyAction, I would retrieve the property called "CustomActionData", which would now be holding INSTALLDIR.

Hope this helps.
Leigh Ravenhall
Expert Information Services