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

How to get properties


1 reply to this topic

JeffR

JeffR
  • Members
  • 4 posts

Posted 22 March 2004 - 18:46

I am reading a user entered value and formatting the string for population into a REG_MULTI_SZ multiple string registry key that is being created by the install.

I am reading the user-entered string, formatting it, then setting a new property with this correctly formatted value all in an immediate custom DLL action.

I then have a deferred custom action in the same DLL that is setting the appropriate registry key from this custom property. The logs show that the property is being set correctly, but I am unable to 'get' the value from within the custom action. I have tried using all of the following approaches:

o Calling MsiGetProperty on the custom property that I set in the immediate custom action

o Creating a property with the same name as the function/custom deferred action and calling MsiGetProperty on "CustomActionData"

o Using both all caps and mixed characters for the property name

o Creating the SecureCustomProperties property and setting it to a semi-colon delimeted list of properties I am tryihg to read from the deferred custom action

I am still unable to 'get' the value for this property. Any ideas of what i'm missing would be greatly appreciated!

Thanks in advance,

Jeff

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 22 March 2004 - 22:54

QUOTE
Creating a property with the same name as the function/custom deferred action and calling MsiGetProperty on "CustomActionData"

That would be the correct way. Let's say your deferred custom action is named CreateMyRegistryEntry then you would have to create an immediate custom action of type 51 (set a property) that sets a property named CreateMyRegistryEntry to the value [YOURREGSTRING]. Make sure that YOURREGSTRING is in all upper case and is listed in SecureCustomProperties. In your deferred custom action you call MsiGetProperty for CustomActionData. Be sure to properly initialize the buffer size in this function.