I did some tests on multiple ways to handle shortcuts a few months ago:
http://sourceforge.net/mailarchive/message.php?msg_id=31481614

I didn't really get any "authoritative" answer on whether my findings
are correct or what option is better, though.

-- 
Nicolás
"Leave it to Microsoft to make computer programming an experimental science"

2013/12/4 Dave Williamson, Clear Sky Software <d...@clearskysoftware.com>:
> Context is a migration of a WiX 2.0.5805.0 solution to WiX 3.8.1128.0.
> Seemed to be working through the compiler and linker errors one by one just
> fine until I hit ICE38 regarding shortcuts.  There are 2 shortcuts created
> to the same installed EXE.  One shortcut is in the start menu and the other
> is on the desktop.  WiX 2.0 compiled MSIs install, uninstall, and major
> upgrade with proper cleanup of the shortcuts just fine.  Now trying to
> tackle in WiX 3.8.
>
>
>
> error LGHT0204 : ICE38: Component component40 installs to user profile. It's
> Key Path registry key must fall under HKCU.
>
>
>
> The message states that component40 installs to user profile.  Why does it
> think that?  The directory it is within is not user specific and the overall
> MSI is ALLUSERS=1.
>
>
>
> The following stackoverflow post looked promising but I'm not understanding
> it yet.
> http://stackoverflow.com/questions/2058230/wix-create-non-advertised-shortcu
> t-for-all-users-per-machine
>
>
>
> And then another stackoverflow post
> http://stackoverflow.com/questions/17245832/wix-program-files-shortcut-for-p
> er-machine-install shows a shortcut as a child of the File.  But doesn't
> really address the fact that a <Directory/> needs to have a <RemoveFolder/>
> and <RegistryValue/> which is HKCU.  Other posts have noted that if HKCU is
> used then when another user uninstalls the registry entries are orphaned
> under the other user and some state that when application is run as another
> user it triggers a repair.  I dunno on this.  I also couldn't find what HKMU
> was in the WiX help file or online other than Hubert Kairuki Memorial
> University (something tells me that isn't relevant J ).
>
>
>
> Is it possible to have an ALLUSERS msi and NOT write to user specific
> registry, file, or any other user specific resource?
>
>
>
>
>
>
>
> In WiX 2.0 we did the following
>
>
>
> . various other wxs constructs .
>
>
>
>       <!-- defines the application installation directory and contents -->
>
>       <Directory Id='TARGETDIR' Name='SourceDir'>
>
>
>
>         <!-- gets a reference to Desktop so we can use it later to add
> shortcuts -->
>
>         <Directory Id='DesktopFolder'/>
>
>
>
>         <!-- defines start menu group -->
>
>         <Directory Id='ProgramMenuFolder' Name='Programs'>
>
>           <Directory Id="ProgramMenuCSSIDir" Name="CS Software">
>
>             <Directory Id="ProgramMenuCSSIUtilitiesDir" Name="Utilities" />
>
>             <Directory Id="ProgramMenuCSSIServicesDir" Name="Services" />
>
>             <Directory Id="ProgramMenuCSSIDocsDir" Name="Documents" />
>
>           </Directory>
>
>         </Directory>
>
>
>
>         <!-- application install group -->
>
>         <Directory Id='ProgramFilesFolder'>
>
>           <Directory Id='CSSIDIR' Name='CSSI'>
>
>
>
>             <?include theincludebelow.inc ?>
>
>
>
>           </Directory>
>
>         </Directory>
>
>
>
>         <!-- System32 install group -->
>
>         <Directory Id="SystemFolder" />
>
>
>
>       </Directory>
>
>
>
> . various other wxs constructs .
>
>
>
>
>
> <Include>
>
>
>
>   <Directory Id='CSWINDOWSDIR' Name='CLEARS_1' LongName='C s Windows'>
>
>     . other file components including file2 .
>
>
>
>     <Component Id="component40" DiskId="1" Guid="removed.">
>
>       <Shortcut Id='startMenuCsWindowsExe' Directory='ProgramMenuCSSIDir'
> Name='CSW' LongName="C s Windows" WorkingDirectory='CSWINDOWSDIR'
> Target="[#file2]" />
>
>     </Component>
>
>     <Component Id="component41" DiskId="1" Guid="removed.">
>
>       <Shortcut Id='desktopCsWindowsExe' Directory='DesktopFolder'
> Name='CSW' LongName="C s Windows" WorkingDirectory='CSWINDOWSDIR'
> Target="[#file2]" />
>
>     </Component>
>
>
>
>   </Directory>
>
>
>
> </Include>
>
>
>
>
>
>
>
>
>
>
>
>
>
> In WiX 3.8 we are trying the following
>
>
>
> . various other wxs constructs .
>
>
>
>       <!-- defines the application installation directory and contents -->
>
>       <Directory Id='TARGETDIR' Name='SourceDir'>
>
>
>
>         <!-- gets a reference to Desktop so we can use it later to add
> shortcuts -->
>
>         <Directory Id='DesktopFolder'/>
>
>
>
>         <!-- defines start menu group -->
>
>         <Directory Id='ProgramMenuFolder' Name='Programs'>
>
>           <Directory Id="ProgramMenuCSSIDir" Name="CS Software">
>
>             <Directory Id="ProgramMenuCSSIUtilitiesDir" Name="Utilities" />
>
>             <Directory Id="ProgramMenuCSSIServicesDir" Name="Services" />
>
>             <Directory Id="ProgramMenuCSSIDocsDir" Name="Documents" />
>
>           </Directory>
>
>         </Directory>
>
>
>
>         <!-- application install group -->
>
>         <Directory Id='ProgramFilesFolder'>
>
>           <Directory Id='CSSIDIR' Name='CSSI'>
>
>
>
>             <?include
> theequivalentincludeofthe2.0withshortcutcomponentstrippedout.inc ?>
>
>
>
>           </Directory>
>
>         </Directory>
>
>
>
>         <!-- System32 install group -->
>
>         <Directory Id="SystemFolder" />
>
>
>
>       </Directory>
>
>
>
>       <?include theincludebelow.inc ?>
>
>
>
> . various other wxs constructs .
>
>
>
>
>
> <Include>
>
>
>
>   <DirectoryRef Id="ProgramMenuCSSIDir">
>
>     <Component Id="component40" DiskId="1" Guid="removed.">
>
>       <Shortcut Id='startMenuCsWindowsExe' Directory='ProgramMenuCSSIDir'
> Name="C s Windows" WorkingDirectory='CSWINDOWSDIR' Target="[#file2]" />
>
>       <RemoveFolder Id="ProgramMenuCSSIDir" On="uninstall"/>
>
>       <RegistryValue Root="HKLM" Key="Software\CorpNameHere\CSSI\C s
> Windows" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
>
>     </Component>
>
>     <Component Id="component41" DiskId="1" Guid="removed.">
>
>       <Shortcut Id='desktopCsWindowsExe' Directory='DesktopFolder' Name="C s
> Windows" WorkingDirectory='CSWINDOWSDIR' Target="[#file2]" />
>
>       <RegistryValue Root="HKLM" Key="Software\CorpNameHere\CSSI\C s
> Windows" Name="installed" Type="integer" Value="1" KeyPath="yes"/>
>
>     </Component>
>
>   </DirectoryRef>
>
>
>
> </Include>
>
>
>
>
>
>
>
> dave williamson
>
> ------------------------------------------------------------------------------
> Sponsored by Intel(R) XDK
> Develop, test and display web and hybrid apps with a single code base.
> Download it for free now!
> http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to