How to fix ICE57.Per-User installation

Our application writes some settings to the registry in the HKCU hive at runtime. I want to delete these settings during uninstall. Here is the code:

<Fragment> <DirectoryRef Id="INSTALLLOCATION" DiskId="1" FileSource="$(var.SourceDirProject)\"> <Component Id="DeleteHkcuManufacturerHive" Guid="GUID"> <Condition>REMOVE="ALL" AND NOT UPGRADINGPRODUCTCODE</Condition> <CreateFolder/> <RemoveRegistryKey Action="removeOnUninstall" Id="HKCUkey" Root="HKCU" Key="Software\$(var.Manufacturer)"/> </Component> </DirectoryRef> </Fragment> 

ICE57: the "DeleteHkcuManufacturerHive" component has both data for each user and data for each machine using the KeyPath key. Why am I getting ICE57? Installation for each user. Thanks in advance.

UPD: Where is the item for each machine? Maybe this is INSTALLLOCATION = Program Files \ ManufacturerDirectory?

+6
source share
2 answers

I have an answer on the wix users mailing list. Here is Peter Shirtcliffe 's answer:

ProgramFiles is the location for each machine. You can access it only with a promotion. If you want to install the program code during installation for each user, you should install it in% LocalAppData% \ Programs.

Delete the condition completely. The component will be installed, but will not work until you uninstall the application. At this point, when the component is removed, the registry key will also be deleted.

+3
source

You work with the HKCU bush, which is available only to the current user.

MSDN declares:

ICE57 confirms that the individual components do not mix data for each computer and user. This custom ICE action checks registry entries, files, directory key paths, and unannounced shortcuts. Mixing data about users and computers in the same component can only result in partial installation of the component for some users in a multi-user environment.

ICEs are checks of your installation package. As stated above, ICE57 should make sure that you do not mix designs for each computer and user. If you need to delete entries in HKCU during uninstallation (and the software is installed for each computer), you can disable this specific check in Visual Studio in Properties> Tool Settings, as shown in the screenshot below:

enter image description here

However, you may think about the root cause of your problem. If you perform the installation for each machine, your installer or application probably should not write to HKCU, since it is available only to the current user, while your application is installed for all users.

+7
source

Source: https://habr.com/ru/post/925401/


All Articles