This question and comments so far are missing one important caveat: Any changes to an MSI or EXE file whatsoever will cause the code-signing signature to be invalid (unless the resulting file has the exact same file hash, which is extremely unlikely).
Is there a reason that you can't re-sign the main package? Note that you can write a powershell or batch script to code-sign an EXE quickly and easily using signtool
. You can add your custom data and resign the package in one step. You can even use a different code-signing certificate for the MSM and EXE if needed.
You can accomplish something very similar by using a pre-signed merge module (MSM) -- Author your main installer as a signed merge-module. Then, include your already-signed MSM into an unsigned Setup EXE package, and add your custom data to the parent EXE installer. The custom data can be added in many different ways, such as a text file in a component, embedded into a custom action, or as a support file in InstallShield.
Unfortunately, this means your main EXE installer is unsigned, which is NOT recommended.