用户配置文件的每台机器安装问题

发布于 2024-09-10 23:05:41 字数 911 浏览 8 评论 0原文

将我的 WXS 数据构建到 MSI 中时,出现以下错误:

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

这让我感到困惑,因为我将项目设置为每台计算机安装,因此根据我的理解,它应该安装到“C:\Users\All Users”或“C:\Users\Default”,而不是实际的用户配置文件。我尝试了几种不同的方法来说明它是每台机器安装,但它们都不起作用。任何想法将不胜感激。我被难住了!

为了使其成为每台机器的一个,我尝试了这两种设置(分别),但都不起作用。

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

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

编辑:CreateFolder 的代码

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

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月亮是我掰弯的 2024-09-17 23:05:41

如果您想创建快捷方式,可以使用 Shortcut 元素:

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

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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文