wix - Why do we get an ICE57 error for non advertised shortcuts in per machine installations? -
this question asking whether 1 of ice57 validators creates false positive error report.
i using wix 3.9 generate installer. want per machine installation non advertised shortcuts.
this wxs example installs text file , shortcut open text file:
<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <product id="*" name="shortcuttest" language="1033" version="1.0.0.0" manufacturer="widget co" upgradecode="--your guid1--"> <package installerversion="200" compressed="yes" installscope="permachine" /> <majorupgrade downgradeerrormessage="a newer version of [productname] installed." /> <mediatemplate embedcab="yes"/> <feature id="productfeature" title="shortcuttest" level="1"> <componentref id="textfile" /> <componentref id="shortcut" /> </feature> <directory id="targetdir" name="sourcedir"> <directory id="programfilesfolder"> <directory id="installfolder" name="shortcuttest"> <component id="textfile" guid="--your guid2--"> <file id="file" name="textfile.txt" source="textfile.txt" keypath="yes"/> </component> </directory> </directory> <directory id="programmenufolder"> <directory id="applicationprogramsfolder" name="shortcut test"> <component id="shortcut" guid="--your guid3--"> <registryvalue root="hkmu" key="software\widgetco\readmetextfile\textfile" name="installed" type="string" value="yes" keypath="yes"/> <shortcut id="shortcut" name="open text file" description="opens text file" target="[installfolder]textfile.txt" workingdirectory="installfolder"/> <removefolder id="applicationprogramsfolder" directory="applicationprogramsfolder" on="uninstall"/> </component> </directory> </directory> </directory> </product> </wix> if build above example msi package, internal consistency evaluator (ice) error:
d:\robert\documents\visual studio 2013\projects\shortcuttest\product.wxs(27,0): error lght0204: ice57: component 'shortcut' has both per-user data , keypath can either per-user or per-machine.
ice57 implying inconsistency between per-user , per-machine data. but, key path of component hkmu, in per machine installation resolves hklm (hkey_local_machine). location of shortcut derives 'programmenufolder', in per-machine installation resolves c:\programdata\microsoft\windows\start menu\ (on windows 8.1). none of component's resources appear have per-user association.
you can build installer package msi suppressing ice57. resulting msi package installs without obvious errors. multiple users can log on , access shortcut. user can un-install package , of resources in package removed.
the answer wix create non advertised shortcut users / per machine has interesting workaround, author advertised shortcuts , turn off advertising. seems round way of creating un-advertised shortcuts.
a common fix ice57 error change <registryvalue...> root hkcu (hkey_current_user). creates installer can leave user registry key behind when un-installed. example if user installs package, registry entry added user a's registry hive. if user b removes package, registry entry not removed user a's registry hive.
in scenario ice57 error bug in internal consistency evaluators? or there have miss-understood?
while researching problem found comment on http://sourceforge.net/p/wix/mailman/message/26687047/ rob mensching:
iirc, bug in ice57. windows installer team didn't @ allusers property when evaluating these values... long time ago though memory may have decayed bit.
it looks bug in ice57.
Comments
Post a Comment