1

My installer works fine for installing to Program Files or AppData depending on the ALLUSERS value (which is set by the user). However, I can't get the icons to distribute to all users when ALLUSERS is set to 1 - currently they only show for the current user.

<Fragment>
    <DirectoryRef Id="INSTALLDIR">
        <Component Id="File1.exe" Guid="*">
            <File Id="File1.exe" Name="File1.exe" DiskId="1" KeyPath="yes" 
                   Source="Content\File1.exe" />
        </Component>
    </DirectoryRef>
    <DirectoryRef Id="TARGETDIR">
        <Component Id="shortcutFile1" Guid="*">
            <Shortcut Id="shortcutFile1" Name="File1" 
                      Target="[INSTALLDIR]File1.exe" 
                      Directory="StartMenuAppFolder" Show="normal" />
            <RemoveFolder Id="removeStartMenuAppFolder" 
                          Directory="StartMenuAppFolder" 
                          On="uninstall" />
            <RegistryValue Root="HKCU" Key="Software\MyApp\shortcutID_0001" 
                           KeyPath="yes" Type="string" Value="" />
       </Component>
    </DirectoryRef>
</Fragment>

Any help would be appreciated.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
dave88
  • 312
  • 5
  • 14
  • I wrote this a while back on the subject, but I am not sure how well it reads. Perhaps you can have a quick skim: **http://stackoverflow.com/questions/29255922/how-can-i-create-a-shortcut-on-the-users-desktop-folder/29498210#29498210** – Stein Åsmul May 04 '15 at 16:11

0 Answers0