Installshield 12: Changing the destination of a merge module at run time

ε祈祈猫儿з 提交于 2019-12-04 18:50:24

When you create the component in the merge module, leave the Destination to INSTALLDIR.

When you consume the merge module in your basic msi project ( redistributables view ) right click the merge module and select properties. Then use the Destination drop down to configure the relationship. The file in the merge module will now go where you tell it to.

Side note, once merged, merge modules no longer exist. Take a look at the built MSI in Orca and you'll see that there are directory table entries that look like this ( Let's assume you configured the module for SystemFolder )

DIR | DIR_PARENT | DefaultDir

TARGETDIR SourceDir ProgramFilesFolder TARGETDIR .:PROGRA~1|program files ISMyCompanyDir ProgramFilesFolder MYCOMP~1|My Company Name ISMyProductDir ISMyCompanyDir MYPROD~1|My Product Name INSTALLDIR IsMyProductDir . INSTALLDIR.SOMEGUID SystemFolder .

The "." represent 'current directory' or 'same as parent'.

So in this case you build up that INSTALLDIR = C:\Program Files\My Company Name\My ProductName\ and that INSTALLDIR.SOMEGUID = C:\Windows\System32

Make sense? In this way you can consume the module in different products deploying to different locations.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!