I’m attempting to transition from NSIS to WiX for our Windows installer and have been unable to find a way to create customised shortcuts with WiX (I would like to specify both the working directory and command line parameters).
Some approaches I’ve tried are:
·Specifying CPACK_PACKAGE_EXECUTABLES, and then using CPACK_WIX_PATCH_FILE to modify the shortcut. This approach doesn’t work because the patching mechanism can only add new XML tags; it is unable to add or modify properties on
·Creating the shortcut myself via CPACK_WIX_EXTRA_SOURCES. This doesn’t work because PROGRAM_MENU_FOLDER is not defined in directories.wxs unless cpack is creating shortcuts itself. And I can’t define this directory myself because
the patching mechanism doesn’t allow modifications to the top level TARGETDIR directory.
Ideas of things that might work but which are not ideal:
·Create an unwanted shortcut with cpack and then define my own shortcuts with CPACK_WIX_EXTRA_SOURCES. But then there is an unwanted shortcut.
·Create separate .bat files for each start menu item so that working directory and command line parameters are not required.