如何检查Windows用户是否可以安装应用程序?或者 Windows 计算机是域的成员吗?

发布于 2024-09-08 00:40:40 字数 339 浏览 4 评论 0原文

我正在我们公司内部使用的应用程序中重新实现自动更新机制。 旧系统使用基于 .exe 的安装程序,我必须将其替换为可以在 Windows 域中工作的基于 .msi 的安装程序。我已经做到了这一点并且效果很好。

我们总部的大部分用户都是windows域的成员,但也有很多远程用户不在域中。对于域中的用户,我们自动分发更新。远程用户应使用应用程序内置的自动更新机制。

所以,问题是: 如何检查Windows用户是否可以在他的机器上安装应用程序? 或者 如何检查运行Windows的计算机是否是域的成员?

(我使用Borland C++ 6进行开发)

I am re-implementing auto-update mechanism in an application for internal use in our company.
The old system used .exe based installers, which I had to replace with .msi based installer which can work in a Windows Domain. This I have done and works well.

Most of users in our headquarter are members of windows domain, but there are many users in remote locations which are not in the domain. For the users in domain we distribute updates automaticly. The remote users shoud use the auto-update mechanism build into the application.

So, the question is:
How to check if windows user can install applications on his machine?
or
How to check if a computer runing windows is a member of a domain?

(I use Borland C++ 6 for development)

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

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

发布评论

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

评论(1

世界等同你 2024-09-15 00:40:40

如果用户不允许/无法安装,为什么不简单地运行 .msi 并让它报告自己的错误呢?检查当前用户的凭据并不真正可靠,特别是当您考虑 UAC 时,这将允许用户有机会临时登录具有域权限的提升帐户来运行 .msi(如果需要)。

Why not simply run the .msi and let it report its own errors if the user is not allowed/capable of installing? Checking the current user's credentials is not really reliable, especially when you take UAC into account, which would allow the user a chance to temporary log into an elevated account with domain privileges to run the .msi if it requires that.

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