简体   繁体   English

.Net安装项目中的自定义对话框

[英]Custom Dialog in .Net Setup Project

See Update Below 请参阅下面的更新

I have been reading about creating custom dialogs for a .NET setup project at Code Project ( http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx ) and I have the Orca tool installed and understand how to customize the dialogs. 我已经在Code Project( http://www.codeproject.com/KB/install/vsSetupCustomDialogs.aspx )上阅读有关为.NET安装项目创建自定义对话框的信息,并且已经安装了Orca工具并了解如何自定义对话框。

One thing, however, I can't seem to figure out. 但是,我似乎无法弄清楚一件事。 Is it possible to have a dialog that displays a list of the users on the machine with a checkbox for each user (dynamic list of checkboxes)? 是否可能有一个对话框显示计算机上的用户列表,并为每个用户提供一个复选框(复选框的动态列表)? How can I pass my user list to the dialog or have some custom code for the dialog besides just editing property tables. 除了编辑属性表外,如何将用户列表传递给对话框或如何为对话框提供一些自定义代码。

I am installing a proxy and what to give the admin the option of which users will use the proxy. 我正在安装代理,以及如何为管理员提供哪些用户将使用代理的选项。 The proxy is used to monitor Internet usage. 代理用于监视Internet使用情况。

UPDATE: I am only concerned about the list of local users on the machine not domain users. 更新:我只关心计算机上的本地用户列表,而不是域用户。

UPDATE OK, I guess I can sum up my question in a more basic way. 更新好,我想我可以用更基本的方式总结我的问题。 Is there a way to have an install dialog that has a dynamic list of checkboxes that is determined by a condition/method that is evaluated when the dialog is shown? 有没有一种方法可以使安装对话框具有动态的复选框列表,该列表由显示对话框时评估的条件/方法确定?

Getting a list of users on a machine is, really, not possible. 确实不可能获得计算机上的用户列表。 In a domain joined situation there could (and almost certainly will) be users that are able to logon to a given machine but who have never previously done so. 在加入域的情况下,可能(并且几乎肯定会)有能够登录到给定计算机但以前从未登录过的用户。 An immediate example is "Domain Admins", who are granted the right to logon to a PC by virtue of being members of the "Domain Admins" group, rather than by their specific user being added to any local group on the machine. 一个直接的例子是“域管理员”,由于其是“域管理员”组的成员,而不是通过将其特定用户添加到计算机上的任何本地组中而被授予登录PC的权限。

If you want to give the admin the option of providing exceptions, your best bet would be to use the Active Directory Object Selection dialog (more up-to-date samples/versions almost certainly exist!) and let the administrator choose exceptions rather than inclusions. 如果要让管理员选择提供例外,那么最好的选择是使用“ Active Directory对象选择”对话框 (几乎可以肯定存在更多最新的示例/版本!),并让管理员选择例外而不是包含例外

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM