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

Custom Actions and Conditions


4 replies to this topic

D-Ment

D-Ment
  • Members
  • 5 posts

Posted 08 January 2003 - 09:48

My problem is that Conditions with a Property (sometimes) does not work and therefore Custom Actions are (not) executed.

The scenario (or why I am thinking this is a IS bug ;-):

In a basic MSI Project I have two Properties, a public Property (called PUBLICPROPERTY) and a private Property called (called PrivateProperty). Each of these Properties is attached to an Dialogs Radio Button Group. Each of the Radio Buttons in this two Dialogs has its own Value: For the PUBLICPROPERTY it is "Yes" and "No". For the PrivateProperty
it is "AddPrinter", "UpdateDriver" and "RemoveDriver". I have set default values to the Properties via the Property Manager.
The defaults are PUBLICPROPERTY="Yes" and  PrivateProperty="AddDriver". When I now run the Setup the UI Sequence runs like expected. The  PrivateProperty splits the UI Sequence Path so I can verify that this Property really changes. To verify a little bit more I used the MSI debugger and all Properties have the expected Values.
So far so good!
I have defined three Custom Actions. The first has the Condition PUBLICPROPERTY="Yes", the second has the Condition  PrivateProperty="AddDriver" and the third has the Condition  PrivateProperty="UpdateDriver".
The first custom Action works like expected (executed when PUBLICPROPERTY="Yes" and not executed when PUBLICPROPERTY="No").
The problem is the second and the third Custom Action. The second Custom Action allways executes (regardless if PrivateProperty="UpdateDriver" or PrivateProperty="RemoveDriver").

Its Voodo, isnt it?

Some tests I did:

1. I have changed the default of PrivateProperty to "UpdateDriver". Now allways the third Custom Action is executed (changing it to "RemoveDriver" or an empty Property no Action is executet). It seems that this Property is something like constant for Custom Actions.

2. I have removed the Radio Button Group and did everything again with a diffrent Property name for the PrivateProperty. It has the same effect.

3. I make sure that there are no misspellings in the Conditions by Cut and Paste the Strings direct from the Dialog to the Condition.

4. I make sure that the Custom Actions has Deffered Execution set so it is executed past the UI Sequence.


So, thats it. I hope someone can help me

Regards
Martin

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 January 2003 - 21:38

A private property is called private because it's value is private to the sequence in which it's set. Setting PrivateProperty in the UI sequence will revert to the default value (defined in property table) when installation switsches to the Execute sequence. I think this is the behaviour you see.

hambone

hambone
  • Members
  • 206 posts

Posted 09 January 2003 - 14:01

i think because you are running the custom actions in 'deferred execution' mode you are losing the pertainent session information.

looking in the help on 'deferred execution of custon actions' they say that 'because the installation script can be executed outside the installation session...the session may no longer exist during the execution on the installation script".  i am thinking that you might need to be using something like the MSIGetProperty function in the ca...

rmadassery77

rmadassery77
  • Members
  • 52 posts

Posted 13 January 2003 - 10:15

If u can possible proceed with public properties, instead, there wont be any problems. Since the CA with public property works fine, why not use a public property. :D
Rajiv Madassery
Galway Scripting Center
Digital GlobalSoft Ltd.
(Subsidiary of Hewlett-Packard Company)

D-Ment

D-Ment
  • Members
  • 5 posts

Posted 30 January 2003 - 10:41

Hi,

thanks for your anwsers. The IS Bronce Support Plan I have was not able to give me informative anwsers like yours.

Remember: Don't push your money out of the window. Don't pay IS for support!!!

Martin