I had trouble with this too. What seems to work is to create a dummy registry 
key for each shortcut you wish to make. Apparently it has something to do with 
the way keypaths work - they aren't allowed to be shortcuts, for reasons I 
don't get. In your case, something like:


    <DirectoryRef Id="DesktopFolder">
      <Component Id="DesktopShortcuts"
Guid="A7319872-9A5C-4A04-BF08-5450D9247263">
          <RegistryKey Root="HKCU" Key="Software\YourCompany\Dummy" 
Action="createAndRemoveOnUninstall">
                <RegistryValue Name="SomethingOrOther" Value="1" Type="integer" 
KeyPath="yes" />
          </RegistryKey>
        <Shortcut Id="DesktopShortcut" Name="LittleApp"
                  Target="[INSTALLFOLDER]LittleApp.exe"
                  WorkingDirectory="INSTALLFOLDER"/>
      </Component>
    </DirectoryRef>


Keith Douglas
Statistics Canada | 170 Tunney's Pasture Driveway, Ottawa ON K1A 0T6
Statistique Canada | 170, promenade Tunney's Pasture, Ottawa ON K1A 0T6
[email protected]
Telephone | Téléphone 613-951-4405
Facsimile | Télécopieur 613-951-1966
Government of Canada | Gouvernement du Canada 


-----Original Message-----
From: E. Timothy Uy [mailto:[email protected]] 
Sent: April-13-12 3:09 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] desktop shortcut guidance

It would be nice if a "desktop shortcut" guide could be added to 
http://wix.sourceforge.net/manual-wix3/toc.htm. I'm lost. Here's my futile 
attempt.

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="ProgramFilesFolder">
        <Directory Id="INSTALLFOLDER" Name="LittleApp" />
      </Directory>
      <Directory Id="ProgramMenuFolder">
        <Directory Id="AppStartMenuFolder" Name="LittleApp" />
      </Directory>
      <Directory Id="DesktopFolder" Name="Desktop" />
    </Directory>

    <DirectoryRef Id="DesktopFolder">
      <Component Id="DesktopShortcuts"
Guid="A7319872-9A5C-4A04-BF08-5450D9247263">
        <Shortcut Id="DesktopShortcut" Name="LittleApp"
                  Target="[INSTALLFOLDER]LittleApp.exe"
                  WorkingDirectory="INSTALLFOLDER"/>
      </Component>
    </DirectoryRef>

Error 1 ICE18: KeyPath for Component: 'DesktopShortcuts' is Directory:
'DesktopFolder'. The Directory/Component pair must be listed in the 
CreateFolders table. D:\Temp\testInstall2\LittleAppSetup\Product.wxs 65 1 
LittleAppSetup Error 2 ICE38: Component DesktopShortcuts installs to user 
profile. It must use a registry key under HKCU as its KeyPath, not a file.
D:\Temp\testInstall2\LittleAppSetup\Product.wxs 65 1 LittleAppSetup Error 3 
ICE43: Component DesktopShortcuts has non-advertised shortcuts. It should use a 
registry key under HKCU as its KeyPath, not a file.
D:\Temp\testInstall2\LittleAppSetup\Product.wxs 65 1 LittleAppSetup
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to