views:

71

answers:

2

When building my WXS data into an MSI I get the following error:

ICE38: Component CreateFolder installs to user profile. It must use a registry key under HKCU as its KeyPath, not a file.

This is confusing me cause I have my project set to be a per-machine installation, so from my understanding it should install to the "C:\Users\All Users" or "C:\Users\Default" not to the actual user profile. I have tried a couple of different methods to say it is a per-machine installation, but none of them work. Any thoughts would be greatly appreciated. I am stumped!

To make it an per-machine I tried these two settings (separately) and neither one worked.

<Property Id="ALLUSERS" Value="2" />

and

<Package InstallScope="perMachine" ... />

EDIT: Code for CreateFolder

            <Directory Id="AdminToolsFolder" SourceName="Admin Tools">
                <Component Id="CreateFolder" Guid="{452A617E-XXXX-XXXX-XXXX-3710802B3BBD}" KeyPath="yes">
                    <CreateFolder Directory="AdminToolsFolder" />
                </Component>
            </Directory>
A: 

If you want to create a shortcut you can use the Shortcut element:

<Directory Id="AdminToolsFolder" SourceName="Admin Tools">
  <Component Id="MyShortcuts" Guid="<guid value>">
    <Shortcut Id="Shortcut_MyAdminTool" Directory="AdminToolsFolder"
              Name="My Admin Tool" Target="[#AdminTool]"
              Show="normal" WorkingDirectory="TARGETDIR" />
  </Component>
</Directory>
0xA3
according to the WiX documentation it needs to be in a component and the component needs a registry key (per-user) or else the same error comes. http://wix.sourceforge.net/manual-wix2/wix_xsd_shortcut.htm is a link to the documentation I am talking about.
Adkins
Yes, a component is needed (or another of the parent elements listed in the documentation. You sample doesn't seem to make sense as you are creating an AdminToolsFolder inside the AdminToolsFolder. Instead you should create the shortcut there.
0xA3
Even if I create the shortcut in there, I get the same error. I get that error any time I try to create a component in the user profile. I really don't get what is going on. Like I said it is a per-machine installation, and I am getting per-user errors :(
Adkins
Also I create the folder so it can be used by my program if needed. I don't actually have anything that goes in there at install time. It is more of a guaranteed place holder.
Adkins
+1  A: 

I wrote up a solution to this problem a while ago: http://robmensching.com/blog/posts/2007/4/27/How-to-create-an-uninstall-shortcut-and-pass-all-the.

Rob Mensching
as this is a professional program, I am trying to avoid writing registry keys simply for the sake of writing them. If I simply ignore the ICE then everything works without a problem, but that in and of itself is a problem. Are there any work arounds to this problem that don't involve the registry key or ignoring, or am I stuck with simply picking the lesser of the two evils?
Adkins
Yep, you have to pick the lesser of two evils. Personally, I usually use the "registry key needed by the shortcut" to keep track of some useful piece of information about my Product. For example the UpgradeCode or install location or version.
Rob Mensching

related questions