views:

328

answers:

1

I added a condition to the OnInstallFilesActionBefore Custom Action via the Sequences editor. I made it so it only executes the first time you install the setup, which means my condition is:

Not Installed

I'm now seeing this warning logged when compiling:

ISDEV : warning The condition for Custom Action OnInstallFilesActionBefore in the InstallExecuteSequence Sequence has been modified. This will cause unpredictable results at runtime.

See, I thought that Custom Action was simply an InstallShield-specific wrapper that allowed us to add code before the InstallFiles action. Does it do anything else other than the code I add to it? If all it does is execute the code I added to it, then do I need to pay attention to this warning? I'm a little concerned that it says it "will cause unpredictable results at runtime", as if they are certain.

As for as I can tell, it works fine. My code is executed when first installing, but not when uninstalling or repairing. That's what I want.

For the record, I'm using DevStudio v9.

+2  A: 

If I remember correctly, and it's been a few years so I may be wrong, that action is only included if you are using a hybrid InstallScript MSI project type. So it would be used to run installscript actions before file copy events.

So adding a condition to it isn't going to cause a problem if you don't have any installscript actions in there. Although it leads to the question of why you want the condition in the first place.

You are probably better of using the Basic MSI project type which will just include the standard MSI actions. It means you don't have the dependency on the ISScript Installshield run time as well so it's just generally a better practice and entirely removes the worry behind your question.

Jimmymcnulty

related questions