A simple wixlib looks something like this. There are some components under a directory ref and they are gathered into a component group.
<Wix...> <Fragment Id="TestWixLib"> <DirectoryRef Id="LIB_Dir"> <Component> <File Id="LIB_test.txt" Source="test.txt" /> </Component> ...more components </DirectoryRef> <ComponentGroup Id="LIB_Components"> <ComponentRef Id="LIB_test.txt " /> .. more componentrefs </ComponentGroup> </Fragment> </Wix> To use this wixlib, reference the component group in a feature and define a directory alias where you want the files to be. <Wix..> <Product...> <Feature Id="Main" ..> <ComponentGroupRef Id="LIB_Components" /> .. other product components... </Feature> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="CompanyProgramsDir" Name="PLC"> <Directory Id="ProductDir" Name="FunkyProduct"> <Directory Id="LIB_Dir" /> <!-- A dir with no name is just an alias for the containing directory element --> </Directory> </Directory> </Directory> </Directory> </Product> </Wix..> -----Original Message----- From: Sean Dockery [mailto:dockerys...@gmail.com] Sent: 27 June 2011 07:11 To: wix-users@lists.sourceforge.net Subject: [WiX-users] Installing WiX library to different location,recalling location on modify/uninstall Hello everyone, I am in the midst of porting an InstallShield InstallScript for MSI project to WiX and I've run into a little trouble. I'm new to WiX and not terribly knowledgeable about Windows Installer, so please forgive me if I'm asking a question for which the answer seems obvious. In my effort to port one of our merge modules to a WiX library, I need to install the content of the WiX library to a custom location - but not the same location as the main product project. I have followed the example on page 125 of Nick Ramirez's book on WiX, in which a type 51 custom action is used to set the AppDataDir property before the "InstallFiles" sequence in the InstallExecuteSequence. The files install to the dynamic location, but - unfortunately - it appears that these components do not remember where they were installed and removing the entire product results in the WiX library contributed files to remain when installed to a non-default location. Is the problem merely that the type 51 custom action should be called earlier in the install execute sequence? For example, should it be set immediately after the AppSearch sequence? Best regards, Sean ----------------------------------------------------------------------------- - All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users SDL PLC confidential, all rights reserved. If you are not the intended recipient of this mail SDL requests and requires that you delete it without acting upon or copying any of its contents, and we further request that you advise us. SDL PLC is a public limited company registered in England and Wales. Registered number: 02675207. Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, UK. ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users