Automatic account creation is now enabled. Captcha authentication required for account creation and editing unless you are trusted here.

ICE57

From WiX Wiki at MindCapers

Jump to: navigation, search

Problem description

Attempting to compile and link a Wix project produces the following message:

Component 'TSB_SC_StartMenu' has both per-user and per-machine data with a per-machine KeyPath.

Explanation

ICE57 checks whether you have any components that mix per-machine and per-user items. It determines this by inspecting registry entries, files, directory key paths, and non-advertised shortcuts.

A component is an atom of update, which is to say that putting items together in a component is a statement by the author of the Wix code that all of the items making up a component must be installed and removed as a single unit.

The presence of a per-user item is contingent on the current user. Per-machine items are not. Mixing per-user and per-machine items in the same component means that the component both depends on the user and does not depend on the user. This is absurd, so ICE57 won't let you do it.

You can find more information on ICE57 in MSDN

Solution

Refactor your components so that none of your components contain both per-user and per-machine items. For example, in the following sample you can fix the problem by removing the <RegistryValue> tag to a new component

    
    <Component Id='StartMenu_Shortcut' Guid='valid guid'>
        <Condition>CreateStartMenuShortcut</Condition>
        <RegistryValue Root='HKCU' 
            Key='SOFTWARE\MyCompany\MyApp' 
            Type='string' 
            Value='StartMenuFolder' 
            KeyPath='yes' />                                    
        <CreateFolder/>
        <Shortcut Id='StartMenu_Shortcut' 
            Name='MyApp'
            Directory='StartMenuFolder'                  
            Icon='MyApp.exe' 
            IconIndex='0'
            WorkingDirectory='MyAppDir'
            Advertise='yes' />
    </Component>                
Personal tools