views:

209

answers:

1

I'm creating a msi based installer (using InstallShield) that has a custom action to start a nested install. The custom action is of type 23, the Source field refers to the second msi that is located on the source media, and the Target field contains "ALLUSERS=[ALLUSERS] ADDLOCAL=ALL". The custom action is started in InstallExecuteSequence after the OnInstallFilesActionAfter action, with a condition &FEATURE=3 so that it gets installed when a certain feature is installed.

When doing a fresh install, the custom action gets executed and the second msi is properly installed. When installing without the mentioned feature and doing a "Modify" install afterwards, where the feature is selected, the msi error 2335 appears. The error is shown during the PublishProduct action of the second msi, and the exact error message is "DEBUG: Error 2335: Path: C:\WINDOWS\Installer\ is not a parent of {local-setup-folder}" (where {local-setup-folder} is replaced with the folder where the second msi resides on install).

I guess that the error comes from the fact that when running a "Modify" the source folder for the action 23 is set to the folder of the cached .msi file, and not the folder where the product was installed initially. How can I prevent error 2335 from appearing?

A: 

I finally solved the case by creating a transform for the .msi file to be installed. The transform adds a custom action type 51 to set the ParentOriginalDatabase property to [SOURCEDIR]mainproduct.msi where mainproduct.msi is the .msi file of the parent install. The custom action is inserted in the InstallExecuteSequence as action prior to PublishProduct. Ugly, but it works.

The error 2335 in the PublishAction action comes from the fact that the ParentOriginalDatabase and the OriginalDatabase property must specify .msi files in the same or a direct subfolder.

vividos

related questions