3

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>
Christopher B. Adkins
  • 3,499
  • 2
  • 26
  • 29
  • How is component `CreateFolder` specified? Can you post the XML? – Dirk Vollmar Jul 23 '10 at 11:00
  • I actually have this same error 13 times for various other components as well. This was just the easiest to show without putting the product or company name out there :P all of the others are simply shortcuts. – Christopher B. Adkins Jul 23 '10 at 11:06

2 Answers2

3

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
  • 33,834
  • 5
  • 90
  • 130
  • 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? – Christopher B. Adkins Jul 27 '10 at 08:18
  • 1
    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 Jul 27 '10 at 14:14
-1

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>
Dirk Vollmar
  • 172,527
  • 53
  • 255
  • 316
  • 1
    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. – Christopher B. Adkins Jul 23 '10 at 11:18
  • 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. – Dirk Vollmar Jul 23 '10 at 11:24
  • 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 :( – Christopher B. Adkins Jul 23 '10 at 11:26
  • 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. – Christopher B. Adkins Jul 23 '10 at 11:34