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?