Ok I'm going the fragment injection route, but having some issues. So I found the component id for the target that these registry values will be needed by in files.wxs: <Component Id="CMP_ID_1" Guid="*"> <File Id="FILE_ID_1" Source="C:/blah/blah/Bin/myapp.exe" KeyPath="yes"/> </Component> In this case its 'CMP_ID_1', using the first cmp id seemed like a safe bet in general to have it referenced by a feature.
So a configurable patch.xml.in looks something like: <CPackWiXPatch> <CPackWiXFragment Id="CMP_ID_1"> <Registry Id='regid1' Root='HKLM' Key='Software\myproj\@myproj_VERSION@ @myproj_MAJOR_VERSION@.@myproj_MINOR_VERSION@' Name='InstallDir' Action='write' Type='string' Value='[INSTALL_ROOT]' /> <Registry Id='regid2' ... /> ... </CPackWiXFragment> </CPackWiXPatch> There are just a few in there to test the process. In CMake, i configure and add it the file to CPACK_WIX_PATCH_FILE: configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/registry-patch.xml.in "${TEMP_DIR}/registry-patch.xml" @ONLY) set(CPACK_WIX_PATCH_FILE "${TEMP_DIR}/registry-patch.xml") Then I generate the msi using cpack. However the resulting msi doesn't set any registry entries, I also don't see any of the entries anywhere in the resulting xml. I did notice that in the documentations [1] and in your example your component id is more complex.. It looks to be something like (and I'm abusing cmake generator expressions for brevity) Id='CM_CP_@cmake_component@.@TARGET_FILE_DIR:tgt@.@TARGET_FILE_DIR:tgt@'. I tried an Id of this nature as well (i.e. <CPackWiXFragment Id="CMP_CP_CoreExecutables.Bin.myapp.exe">) but this also did not work. Am I obtaining the id wrong? The documentation is a little confusing compared to whats being generated. so I'm not sure exactly sure if I have the proper id. Is there a way to get the Id from the in cmake to configure the file directly? Maybe there is another issue entirely? -Jameson [1] http://www.cmake.org/cmake/help/v3.0/module/CPackWIX.html?highlight=cpack_wix_patch [2] https://github.com/ngladitz/cmake-wix-testsuite/tree/master/fragment_injection -- View this message in context: http://cmake.3232098.n2.nabble.com/CPack-WIX-examples-tp7588561p7588591.html Sent from the CMake mailing list archive at Nabble.com. -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake