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

CustomActionData


4 replies to this topic

joker_pl

joker_pl
  • Full Members
  • 11 posts

Posted 10 November 2005 - 16:00

Hi i got problems with setting 'parameters' for my CA.
i got CA
Action: callDllTest
Type: 1
Source: dllBinFile
Target: TestFunction

also i got CA
Action: callDllTest.SetParameters
Type: 51
Source: callDllTest
Target: [ProductVersion];[ProductName]

i got button in dialog and when i push it i call 1st callDllTest.SetParameters and after that callDllTest.
In TestFunction i call MsiGetProperty with "CusomActionData" but it returns null. does any one know why its null?
Thanks for any tips.

akerl

akerl
  • Full Members
  • 104 posts

Posted 11 November 2005 - 09:46

I think, that you call the second ca at the client process. The propery CustomActionData is valid only, in server process. In other words. You must implement this action between InstallInitalize and InstallFinalize. Further, you must specify this action as deferred. Add 1024 or 3072 to the ca type.

- Andreas

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 11 November 2005 - 10:03

Otherwise (if your custom action is not deferred, betwen InstallInitialize and InstallFinalize) it has direct access to the properties.

joker_pl

joker_pl
  • Full Members
  • 11 posts

Posted 14 November 2005 - 09:38

thanks a lot for your help, but when i add 1024 or 3072 to action 51 i get 2723 error.
and what bout calling between InstallInitialize and InstallFinalize - i need to call this CA from UI.

Edited by joker_pl, 14 November 2005 - 10:04.


akerl

akerl
  • Full Members
  • 104 posts

Posted 14 November 2005 - 10:38

Don't add 1024 or 3072 to the CA Type 51. Add the values to the executing action, in your case type 1. The property CustomActionData is only available between InstallInitialze and InstallFinalize. If you need the CA in UISequence, you've full access to all installer properties. If you need the property TARGETDIR e.g. wink.gif , you can get this property with Session.Property["TARGETDIR"] or MsiGetProperty().

Andreas Kerl

Inside Windows Installer 4.5
ISBN 3-86645-431-7