Yes, Im aware of the posibility that the ALLUSERS property can change. And I
think that is exactly the problem with a component which has a HKCU registry
entry as keypath (which is needed to pass ICE57) and an unadvertised
shortcut . When a per-machine installation is done, the shortcut is placed
in the all users start menu (is this location a per-user location?). The
registry key is placed in the HKCU of the person who is installing the
application. What happens if another person uninstalls the application? I
expect the registry key could not be found and would not be deleted, which
leaves us with garbage in the registry. 


Rob Hamflett wrote:
> 
> Your right about the ICE warnings be a complete pain for unadvertised
> shortcuts.  The problem is 
> that someone could change the value for ALLUSERS in your installation
> package, and the ICEs allow 
> for this.  Many of us just ignore them.
> 
> Rob
> 
> Bart Kapitein wrote:
>> Hello,
>> 
>> I have read several other messages about shortcuts and I understand that
>> shortcuts are very difficult. I have successfully created advertised
>> shortcuts, but I am unable to create unadvertised shortcuts.
>> 
>> What I do is the following:
>> 
>> I create the following directory structure:
>> ProgramMenuFolder\VendorName\ProductName.
>> Building this gives me 4 errors: ICE18, ICE38, ICE64, ICE64. I solve the
>> ICE18 and ICE64 errors by creating a component in the directory with two
>> removeFolder actions (one for the ProductName folder and one for the
>> VendorName folder).
>> 
>> I solve the ICE38 error by adding a RegistryKey entry in the HKMU with
>> key Software\VendorName\Productname\Version\Install.
>> This key will be created in HKLM on a per-machine installation and in
>> HKCU on a per-user installation (which is correct I think).
>> 
>> Now I can create advertised shortcuts in this directory. I do this by
>> adding a child shortcut element in a file element. This works.
>> 
>> Now the unadvertised shortcut:
>> 
>> I create another component in the
>> ProgramMenuFolder\VendorName\ProductName directory. In the component I
>> add a shortcut which is unadvertised.
>> Building this gives me 3 errors: ICE18, ICE38, ICE43. I solve the errors
>> by creating a RegistryValue in the HKMU with the key
>> Software\VendorsName\ProductName\Version\Install\UnadvertisedShortcut
>> and an integer value of 1. (which is the same solution as described
>> above for the directory structure in the start menu).
>> 
>> Building this gives me 1 error: ICE57. It claims that the component has
>> per-user data and a keypath that can be per-user or per-machine. That I
>> don't understand. When a per-machine installation is done, the shortcut
>> is created in the "all users" start menu and the registry key is created
>> in HKLM. (is the "all users" startmenu a user directory?)
>> 
>> I also tried to change the location of the registry key to HKCU. This
>> solves the ICE57 error, but then the key is created in the registry of
>> the user who is installing the application. Even when a per-machine
>> installation is done. I don't think this is correct. (Correct me if I'm
>> wrong)
>> 
>> For now I decided to use advertised shortcuts. But it would be nice to
>> use unadvertised shortcuts too. I wonder how a Wise or InstallShield
>> installation deals with this problem.
>> 
>> An example with a working advertised shortcut and a failing unadvertised
>> shortcut:
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";>
>>   <Product Id="76125a4b-6d52-4fac-88a4-fa04c6cb19a6" Name="MyApp"
>> Language="1033" Version="1.0.0.0" Manufacturer="Vendor"
>> UpgradeCode="6a424610-c976-4487-a667-137242f8b536">
>>     <Package InstallerVersion="200" Compressed="yes" />
>>     <Media Id="1" Cabinet="MyApp.cab" EmbedCab="yes" />
>>     <Directory Id="TARGETDIR" Name="SourceDir">
>>       <!-- Program files folders -->
>>       <Directory Id="ProgramFilesFolder">
>>         <Directory Id="VendorFolder">
>>           <Directory Id="INSTALLLDIR" Name="MyApp">
>>             <!--Executable with advertised shortcut -->
>>             <Component Id="ProductComponent"
>> Guid="73c20b23-2ee1-4998-9fff-b3a2384cde9e">
>>               <File Id="MyApp.exe" Name="MyApp.exe"
>> Source="..\MyApp\bin\debug\MyApp.exe">
>>                 <Shortcut Id="MyApp.exe" Directory="StartMenuDir"
>> Name="MyApp" WorkingDirectory="INSTALLDIR" Advertise="yes" />
>>               </File>
>>             </Component>
>>           </Directory>
>>         </Directory>
>>       </Directory>
>>       <!-- Start menu folders -->
>>       <Directory Id="ProgramMenuFolder">
>>         <Directory Id="VendorStartMenu" Name="Vendor">
>>           <Directory Id="StartMenuDir" Name="MyApp">
>>             <!-- Make sure the start menu is created and deleted on
>> install/uninstall and is 'per user' -->
>>             <Component Id="StartMenuEntries"
>> Guid="{53F60C9B-95D2-427e-804B-D133833D6E98}" DiskId="1">
>>               <!-- Create registry key (which makes this component
>> dependant on the registry and not on a file) -->
>>               <RegistryKey Id="MyApp"
>> Key="SOFTWARE\Vendor\MyApp\1.00\Install" Root="HKMU"
>> Action="createAndRemoveOnUninstall" />
>>               <!-- Make sure the start menu is cleaned on unstall -->
>>               <RemoveFolder Id="StartMenuDir" On="uninstall"
>> Directory="StartMenuDir" />
>>               <RemoveFolder Id="VendorStartMenu" On="uninstall"
>> Directory="VendorStartMenu" />
>>             </Component>
>>             <!--Unadvertised shortcut -->
>>             <Component Id="UnadvertisedShortcut"
>> Guid="{A09E5CD1-548E-4aa3-AA62-721BAF6BEAB4}">
>>               <!-- HKMU gives ICE57, HKCU works but I think that is not
>> the correct location for the key -->
>>               <RegistryKey Key="SOFTWARE\Vendor\MyApp\1.00\Install"
>> Root="HKMU" Action="none">
>>                 <RegistryValue Id="UnadvertisedShortcut"
>> Name="UnadvertisedShortcut" Type="integer" Value="1" Action="write"
>> KeyPath="yes" />
>>               </RegistryKey>
>>               <Shortcut Id="Unadvertisedshortcut" Name="MyApp
>> (UnAdvertised)" Directory="StartMenuDir" WorkingDirectory="INSTALLDIR"
>> Target="[!MyApp.exe]" Advertise="no" />
>>             </Component>
>>           </Directory>
>>         </Directory>
>>       </Directory>
>>     </Directory>
>>     <Feature Id="ProductFeature" Title="MyApp" Level="1">
>>       <ComponentRef Id="ProductComponent" />
>>       <ComponentRef Id="StartMenuEntries" />
>>       <ComponentRef Id="UnadvertisedShortcut" />
>>     </Feature>
>>   </Product>
>> </Wix>
>> 
>> ---
>> 
>> Bart Kapitein
>> E-mail disclaimer / confidentiality footer
>> 
>> Dit e-mail bericht is slechts bestemd voor de (rechts)persoon aan wie het
>> is gericht en kan informatie bevatten die persoonlijk of vertrouwelijk is
>> en niet openbaar mag worden gemaakt krachtens wet-, regelgeving of
>> overeenkomst. Indien u niet de geadresseerde(n) (of verantwoordelijk voor
>> de bezorging van dit bericht bij de juiste persoon) bent, wordt u
>> verzocht de verzender hiervan direct op de hoogte te stellen. Kodision
>> B.V. staat niet in voor de juiste en volledige overbrenging van de inhoud
>> van een verzonden e-mail, noch voor tijdige ontvangst daarvan. Aan dit
>> e-mail bericht kunnen geen rechten worden ontleend. Meningen, conclusies
>> en andere informatie in dit bericht die niet gerelateerd zijn aan de
>> officiele bedrijfsactiviteiten van Kodision B.V., dienen geinterpreteerd
>> te worden als niet gegeven of op enigerlei wijze gesteund door Kodision
>> B.V. 
>> 
>> This e-mail message is intended to be exclusively for the addressee and
>> privileged/confidential information may be contained in this message. If
>> you are not the addressee indicated in this message (or responsible for
>> delivery of the message to such person), you may not copy or deliver this
>> message to anyone and notify the sender immediately by returning this
>> e-mail message. Kodision holds no responsibility for possible delay of
>> this message and can not guarantee the complete and full transmission of
>> its content. No rights can be derived from this message. Opinions,
>> conclusions and other information in this message that do not relate to
>> the official business of Kodision B.V. shall be understood as neither
>> given nor endorsed by it.
>> 
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Shortcuts-and-ICE-tf2912497.html#a8161329
Sent from the wix-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to