WIX 用户元素似乎在每次安装时创建一个新的用户配置文件 [英] WIX User Element Seems to create a new user profile on every install

查看:29
本文介绍了WIX 用户元素似乎在每次安装时创建一个新的用户配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 WIX 安装程序的组件中有这个位

I have this bit in a Component in my WIX Installer

    <util:User Id="CIUSER" CreateUser="yes" UpdateIfExists="no" Name="myuser" PasswordNeverExpires="yes" Password="noneofyourbusiness">
      <util:GroupRef Id="Users" />
    </util:User>

我也在代码的其他部分使用它作为参考来设置目录权限.

I also use this as a reference in other parts of the code to set directory permissions.

似乎每次安装我的产品时都会创建一个新的用户配置文件.因此,如果在桌面上放置了任何 id,以该用户身份登录,从安装到安装都看不到它.

It seems like a new user profile gets created each time I install my product. So if anything id placed on the desktop, logging in as this user doesn't see it from install to install.

在大多数情况下,我只是在安装程序中有这个代码来帮助设置我们系统的人.这是一个桌面应用程序,但它作为单个设备"出售,而不是通用计算机,我们正在创建一个非特权帐户来执行我们的应用程序.

For the most part I just have this code in the installer to assist people who are setting our system up. This is a desktop application, but it is sold as a single "device" and isn't a general use computer and we are creating a non-privledged account to execute our application under.

这是 WIX 3.5.有没有人以前见过这样的事情,或者知道我做错了什么?

This is WIX 3.5. Anyone see anything like this before or know what I may be doing wrong?

它可以很好地创建用户并设置适当的权限,现在 Windows 7 中的用户下只存在多个配置文件.

It creates the user fine and sets the proper permissions, just multiple profiles now exist under users in Windows 7.

推荐答案

RemoveOnUninstall 属性设置为 no,默认为 yes.您实际上是在每次安装时创建一个新用户,因此配置文件是不同的.

Set RemoveOnUninstall attribute to no, the default is yes. You are really creating a new user with every installation and so the profiles are distinct.

卸载时无法删除配置文件变成了 WiX 3.5 中的已知缺陷.
它独立于 UpdateIfExists 属性,也与是否卸载并重新安装或升级产品无关.

The failure to remove the profile on uninstall turns to be a known defect in WiX 3.5.
It is independent of UpdateIfExists attribute, and it also does not matter whether the product is uninstalled and reinstalled, or upgraded.

Rob Mensching 对缺陷的说明 说在 WiX 4.0 之前不会修复自定义操作错误.这也提醒我们,wixutil 的所有实现都是使用 自定义操作 并且我们都在技术上能够创建更好的自定义操作来处理用户帐户并将其作为二进制文件或脚本包含在 MSI 中,前提是问题足够紧急.或者也许只是一个在卸载时删除不活动的用户配置文件.

Rob Mensching's note on the defect says that custom action bugs will not be fixed before WiX 4.0. This also reminds us that all of wixutil is implemented using a custom action and that we all are technically able to create a better custom action for handling user accounts and include it in the MSI as a binary or a script, provided that the issue is urgent enough. Or maybe just one to remove inactive user profiles on uninstall.

(此答案主要归功于问题作者进行的额外研究.发现我自己对原因的第一次尝试是错误的.谢谢.)

(Credit for this answer goes largely to additional research conducted by question author. My own first shot at the cause has been found to be wrong. Thank you.)

这篇关于WIX 用户元素似乎在每次安装时创建一个新的用户配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆