cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
KingVoodoo
Level 7

Deferred custom actions

Hi,
does anybody know why it's not possible to Access properties in CustomActionData when removing an application. :confused:
E.g.

Set property DeferredCA to [INSTALLDIR]

if REMOVE~="ALL"

In deffered ca:

strDir = session.Property("CustomActionData")

strDir is empty. Why????
:confused:

Thanks
Labels (1)
0 Kudos
(6) Replies
Christopher_Pai
Level 16

Have you logged the installer? What is REMOVE set to? Does your Type 51 CA condition evaluate to true?

FWIW I also not to use conditions like Not Installed and REMOVE="ALL". Instead I tend to use feature and component states. I also don't advise people to use vbscript/jscript custom actions in case you are.
0 Kudos
KingVoodoo
Level 7

Thanks for the reply
REMOVE = ALL
Yes the condition evaluates to true and yes I'm running a vbscript.
What would you recommend instead of a script?

Thanks again.
0 Kudos
KingVoodoo
Level 7

It seems that it depends on the msi. :confused:
It works in some but not in others, anyone have an idea why that is?
0 Kudos
Christopher_Pai
Level 16

Here's why I don't use VB/JScript:

http://blogs.msdn.com/b/robmen/archive/2004/05/20/136530.aspx

This isn't a theoretical argument, I've seen it in real life also. InstallScript, C++, C#(DTF) are all fine.

There isn't some random thing going on from MSI to MSI. I'd have to see your MSI and logfiles to try to explain the why behind what you are seeing.
0 Kudos
KingVoodoo
Level 7

I've tried the same CAs in different MSIs with different results; some work some don't.
So there must be some differences in the MSIs or are you saying that I fail to obtain the value because I'm using vbscript?
The only thing I'm doing right now is displaying a message msgbox session.Property("CustomActionData")
Would I get different results if I were using C#? I very much doubt that the content of CustomActionData depends on how I access it.
Can you tell me what I should be looking for in the log file?
Writing C# etc is not an option, we don't have the tools for that.

Thanks.
0 Kudos
Christopher_Pai
Level 16

I'm not saying you aren't getting the data simply because it's VBScript, I'm saying that there will come a day ( probably on a customers machine ) where you don't even get the MsgBox, you just get a crash for no explainable or easily debuggable reason. It's a fundamental infrasturture flaw in MSI it how it hosts ActiveScript code.

I can't answer why one isn't working and one isn't working without seeing the source and/or looking at the logs. Maybe this article will help you though:

http://www.installsite.org/pages/en/isnews/200108/index.htm
0 Kudos