检测用户是否选择“所有用户”或“只有我”在自定义操作中
我试图检测用户在安装程序期间是否选择了“所有用户”或“仅我”广播。我有一个自定义操作设置,它覆盖了多个方法(OnCommit、OnBeforeInstall 等)。现在我正试图在 OnCommit 期间找出这些信息。
我读过我想要获取的属性是 ALLUSERS 属性,但我没有找到它将存储在实例/本地数据中的位置。
有谁知道有办法得到它吗?
-本
I'm trying to detect if the user has selected the "All Users" or the "Just Me" radio during the install of my program. I have a custom action setup that overrides several methods (OnCommit, OnBeforeInstall, etc.). Right now I'm trying to find out this information during OnCommit.
I've read that the property I want to get at is the ALLUSERS property, but I haven't had any luck finding where it would be stored in instance/local data.
Does anyone know of a way to get at it?
-Ben
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我要在这里回答我自己的问题。
解决方案是在安装项目的属性 GUI 中查看自定义操作。从那里,选择一个自定义操作允许我编辑 CustomActionData,在这种情况下我输入:
从那里我可以从自定义操作 CS 代码检测它是否是所有用户安装:
希望这对那里的人有帮助:)
Going to answer my own here.
The solution was to view the custom actions in the properties gui for the Setup project. From there, selecting a custom action allowed me to edit CustomActionData, in which case I put:
From there I could detect whether it was an all-users install from the custom action CS code:
Hope this helps someone out there :)