If you wish to retain the advertised nature of the shortcut, you will have a harder time because the shortcut has to live in the same component as the eventual target (which means you have to have the same component with different resources based on whether the component lives in the stand-alone application or the integrated application, which is a violation of the component rules. Violating it could possibly cause the shortcut to be orphaned depending on the installation/upgrade/removal sequences between the stand-alone and integrated products.
If you wish to target a file from a merge module in a shortcut, you have to assemble the target like this: "[#fileid.mergemoduleguid]". If you are autogenerating the MSM's package guid, that value might be hard to anticipate, depending on your build environment. Instead, think of the situation this way: Component GUIDS are used to identify components universally in the Windows Installer universe. Component Ids, File Ids, etc. are used to identify those elements WITHIN any arbitrary package. Thus, you don't have to use the same merge module in both installation packages, you just have to use the same merge module content you care about between both packages. And the easiest way to do that would be to use wixlibs, which are wix-toolset-specific "libraries" of compiled wix code, analogous to merge modules in the larger Windows Installer world but without several of the problems associated with merge modules. Here's how this can work in practice: You generate a wixlib (compile with candle, link with lit) the code containing the shared components and their resources. That code consists of .wxs files containing only Fragments as direct children of the root Wix elements. You reference that wixlib in your standalone application, which will include the appropriate ~Ref elements required to eventually include all your fragments in your wixlib. Your standalone app is now built and can easily create a non-advertised shortcut that targets any file (using simple "[#fileid]" syntax) in your wixlib. You generate an MSM that has a similarly small wxs file as your standalone app, except it uses the Module element instead of the Product element and doesn't include the shortcut. You reference the resulting MSM file in your integrated package. The result is that the shared components are the same (have the same GUIDS and the same contained resources) even though the IDs differ (the integrated product has those IDs with the appended ".GUID" on them). They act as you expect them to act in scenarios where the standalone app and the integrated app are both installed and removed in all combinations of ordering/version differing/etc. as if the merge module had been used in building both packages. And, when you finally move away from non-wix toolsets, you can simply drop the wrapping MSM and directly link the wixlibs (remembering to replace the Merge elements with appropriate ~Ref elements to pull in the fragments from the wixlibs), so you have your migration story. Let us know how that works for you. -----Original Message----- From: Dave Mateer [mailto:dave_mat...@ntm.org] Sent: Thursday, October 08, 2009 5:30 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] WiX-users Digest, Vol 41, Issue 37 The whole stack (code, merge module, standalone application, and larger application) are developed entirely in-house. The larger application is NOT using WiX. Right now it is using InstallAware, but we are looking to slowly (module by module) migrate the entire thing to WiX. This is a first step. I am not familiar with wixlibs and would be interested if that is an option. The shortcut does not need to be advertised. It does not matter either way. The history is this: we have a tiny application (three dlls, two flat-files, and an app.config) that has been developed as a stand-alone project. The install was created using WiX (with an advertised desktop shortcut) and all was well. Then we decided to add this application into a larger application (as well as keep it standalone). The files will install into a different location in the larger application as opposed to the stand-alone. I thought a merge module might save me the headache of maintaining two separate WiX files as components are added to the application in the future. The stand-alone WiX file would basically just include the merge module and add a desktop shortcut. The larger application would just include the merge module. Since it's such a small project, it's kind of academic at this point, but I still would like to know how to do this the right way. I really appreciate your help on this. The entire world of installers is new to me and its very daunting at this point. Thanks, Dave ------------------------------ Message: 2 Date: Thu, 8 Oct 2009 05:00:57 -0700 From: "Blair" <os...@live.com> Subject: Re: [WiX-users] Create shortcut for file in merge module To: "'General discussion for Windows Installer XML toolset.'" <wix-users@lists.sourceforge.net> Message-ID: <bay122-ds154128d2a061a4abcf221cd...@phx.gbl> Content-Type: text/plain; charset="us-ascii" Are you building the merge module? If you are, are you sharing the merge module with others? If not, is the larger application being built with WiX as well? Merge modules are very useful but they have several issues. If you don't really need them, wixlibs can be a much easier alternative. Next set of questions: Do you want/need the shortcut "advertised" (or alternately, do you want it to NOT be advertised)? Based on the answers, we can help steer you towards some solutions. -----Original Message----- From: Dave Mateer [mailto:dave_mat...@ntm.org] Sent: Wednesday, October 07, 2009 12:49 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Create shortcut for file in merge module Sorry, noob question, but I can't figure it out. How do you create a shortcut to a file in a merge module? I have a common set of components that need installed in two contexts: one, as a standalone, and the other, as part of a larger application. I am putting the common components in a merge module, but only want the shortcut for the stand-alone. The merge module will be included in the installer of the larger application separately and I do not want the shortcut in that case. Any pointers? Thanks for your help, Dave ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users