disclaimer : i've been forced jump ship favorite tried , true vs setup project wix project requirement which, knowledge vs setup project cannot fulfill (as described here). such, i'm really, new wix "duh" question.
trying take slow, i'm learning how create shortcuts primary executable on desktop , program files menu. i've found how create component, , have stuck in componentgroup contain main files (probably wrong move right off) have far:
<fragment> <componentgroup id="productcomponents" directory="installfolder"> <!-- todo: remove comments around component element , componentref below in order add resources installer. --> <component id="cmp_foosetup"> <file id="file_foo.exe" source="$(var.foo.targetpath)" keypath="yes"/> </component> <component id="applicationshortcut"> <shortcut id="fooshortcut" name="foo" description="foos bar." target="[#file_foo.exe]" workingdirectory="applicationrootdirectory"/> <registryvalue root="hkcu" key="software\foocompany\foo" name="installed" type="integer" value="1" keypath="yes"/> <removefile id="removefooshortcut" name="foo.lnk" on="uninstall"/> </component> </componentgroup> i want 1 shortcut go desktop, , go program menu shortcut. end, i've defined following folder structures :
<directory id="targetdir" name="sourcedir"> <directory id="programmenufolder"> <directory id="applicationprogramsfolder" name="foobar"> <!--this shortcut should placed. how? --> </directory> </directory> <directory id="desktopfolder"> <!--this shortcut should placed. how? --> </directory> <directory id="programfilesfolder"> <directory id="installparent" name="foobar"> <directory id="installfolder" name="foo"/> </directory> </directory> </directory> everything in bones , experience programmer (limited though may be) screams "hey, should able use id of shortcut component within directory structures instruct installer create these shortcuts!", not know how that. seems should rudimentary search has turned nothing.
is possible? if so; how? if not; should make work?
please kind...
it not possible use component in multiple places (directories). alternative create multiple components moving directory attribute componentgroup component tag.
<componentgroup id="productcomponents"> <component id="cmp_foosetup" directory="installfolder"> <file id="file_foo.exe" source="$(var.foo.targetpath)" keypath="yes"/> </component> <component id="applicationshortcut" directory="installfolder"> <shortcut id="fooshortcut" name="foo" description="foos bar." target="[#file_foo.exe]" workingdirectory="applicationrootdirectory"/> <registryvalue root="hkcu" key="software\foocompany\foo" name="installed" type="integer" value="1" keypath="yes"/> <removefile id="removefooshortcut" name="foo.lnk" on="uninstall"/> </component> <!-- here added directory attrib , changed id. --> <component id="desktopshortcut" directory="desktopfolder"> <shortcut <!-- new id --> id="fooshortcutdesktop" name="foo" description="foos bar." target="[#file_foo.exe]" workingdirectory="applicationrootdirectory"/> <registryvalue root="hkcu" key="software\foocompany\foo" <!-- new name --> name="installed_desktop" type="integer" value="1" keypath="yes"/> <!-- new id --> <removefile id="removefooshortcutdesktop" name="foo.lnk" on="uninstall"/> </component> </componentgroup> as asked, possible change wxs include component inside directory tag, this:
... <directory id="desktopfolder"> <component> <shortcut ... /> </component> </directory> ...
Comments
Post a Comment