This is how I do it:

      <!--Setting up the shortcuts for the product-->
      <Directory Id="ProgramMenuFolder" Name="Programs">
        <Directory Id="ProgramMenuDir" Name="$(var.ShortcutName)">
          <Directory Id="ProgramMenuSubFolder" Name="LOGGERS">
          </Directory>
        </Directory>
      </Directory>
    </Directory>

      <Component Id='LoggersShortcut'
Guid='2A6D411E-5CE9-4F38-8F25-361CBFCABB5A'
Directory='ProgramMenuSubFolder'>
        <CreateFolder Directory="ProgramMenuSubFolder"  />
        <RemoveFolder Id='ProgramMenuSubFolder' On='uninstall'
Directory='ProgramMenuSubFolder'/>
        <RegistryValue Root='HKCU'
Key='Software\ShortcutProperty\[PRODUCTNAME]' Type='string' Value='1'
KeyPath='yes' />
      </Component>

Kind Regards,

Natalie Carr

Tel:  +353 42 9332399
Email:  natalie.c...@measuresoft.com
Web:   http://www.measuresoft.com

-----Original Message-----
From: Budde, Marco [mailto:bu...@telos.de] 
Sent: Wednesday, December 05, 2012 10:21 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] ProgramMenuFolder: Directory Shortcut

Hi,

I am just porting one of our setup projects from "Visual Studio Setup &
Deployment" to WiX. So far everything looks good, but I have one major
problem. 

There is an "example" subdirectory in the installation directory. I have to
install a shortcut to this directory in the start menu of Windows. I have
already installed a lot of shortcuts to files, but I do not know how to
install a shortcut to a directory.

I have already tried several approaches, but I am always getting error
messages when building the WiX project, e.g.:

<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
      <Directory Id="API_DirExamples" Name="examples">
     ...
      </Directory>
      <Component Id="Test" Guid="634c82e9-8adc-48cd-b054-ca2365a95b66">
          <Shortcut Id="API_StartMenuExamples" Name="Examples"
Directory="Main_DirStartMenu" Advertise="yes" />
       </Component>
 </Directory>

I am getting this error:

   error LGHT0204: ICE18: KeyPath for Component: 'Test' is Directory:
'API_DirExamples'. The Directory/Component pair must be listed in the
CreateFolders table.

Adding a <RegistryValue> to the component results into other error messages.


Best regards,
  Marco

----------------------------------------------------------------------------
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely
access PCs and mobile devices and provide instant support Improve your
efficiency, and focus on delivering more value-add services Discover what IT
Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to