The function is used inside a CA called just before InstallFinalize.
Call to MsiGetProperty fails without return
Posted 24 May 2001 - 11:58
Posted 24 May 2001 - 12:30
Posted 24 May 2001 - 13:33
So what are you saying is that there is no way I can access windows installer properties from a InstallScript function?
My problem was entirely different. What I am trying to do is to execute an action only at install time and not at uninstall time. I tried to set a property I created, when the "Remove" button is pressed and use it later to decide if the sequence is for uninstallation. I'll be happy to do it any other way if it's possible.
Posted 24 May 2001 - 14:09
No I am not saying that. I was saying direct access to properties in a deferred custom action is not possible. But you can via the CustomActionData method.
There is no problem setting a condition on a deferred custom action. (I am assuming your action is deferred because you have placed it between InstallInitialize and InstallFInalize).
The property being set on your remove button would need to be all capital letters ie public because private properties set or changed in the user sequence can not be read in the execute sequence.
I would question your use of the Remove button (on the maintenance dialog) this is not the only way to remove a package. eg. msiexec /X "product.msi" will do it. Under Win2K and WinXP there is a remove button on the add remove programs control panel applet.
You should make your custom action dependent upon the component it is related to. If CompX is being removed the condition $CompX=2 will be true. If you have a more global removal you could use the condition REMOVE="ALL"
Posted 24 May 2001 - 14:34
Anyway, I've got the point and your last suggestion is definitley what I was looking for in the first place. I'll try it.
Thanks again,
Jean
Posted 24 May 2001 - 15:57
Thanks again!