Search code examples
wixwindows-installerallusersprofile

Per-Machine install problem with User Profile


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>

Solution

  • 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.