使您的程序与 Active Directory/终端服务兼容时应遵循的准则
想知道在编写应用程序时是否应该遵循任何准则,该应用程序不仅应该在普通的非联网计算机上运行,而且还可以在使用 Active Directory(或其他目录服务)设置的计算机/网络上运行和/或终端服务? 有什么我应该注意、注意的吗?
Wondering if there's any guidelines that should be followed when writing an application that should work not only on a plain ol' non-networked computer but also on a computer/network that is setup with Active Directory (or some other directory service) and/or Terminal Services? Anything I should look out for, be aware of, etc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Microsoft 已将终端服务重命名为“远程桌面服务”,因此使用旧术语搜索和查找 MSDN 并不具有建设性。
我开始查看此处的远程桌面服务编程指南:
http://msdn.microsoft.com/en-us/library/aa383490(VS.85).aspx
Microsoft has renamed Terminal Services to 'Remote Desktop Services' so searching and looking around MSDN my not be as constructive using the old terminology.
I'd start having a look around Remote Desktop Services Programming Guidelines found here:
http://msdn.microsoft.com/en-us/library/aa383490(VS.85).aspx
在 AD 站点上,起点如下:
[http://msdn.microsoft.com/en-us/library/ms682458(VS.85).aspx][2]
On the AD site a starting point would be here:
[http://msdn.microsoft.com/en-us/library/ms682458(VS.85).aspx][2]
最需要注意的事情:
在终端服务器上,用户不是管理员,他们无权:
(ini 文件)其他几点:
- 某些 API(如获取 Windows 目录)将返回重定向结果(在本例中为 homedrive 的 windows 子文件夹),除非您将可执行文件标记为 终端服务器感知
- 您的应用程序不得依赖 HKCU 中的设置,以免在不存在时阻止启动
- 多个用户可能同时使用您的应用程序,因此每个用户必须能够拥有自己的设置(在 HKCU 中)
The most important things to be aware of:
On a Terminal Server users are not admins, they have no rights to:
Some other points:
- Certain API's like getting the Windows directory will return redirected results (in this case the windows subfolder of the homedrive) UNLESS you mark your executable as Terminal Server aware
- Your application must not rely on settings in HKCU that prevent startup when not present
- Multiple users might use your app concurrently so each user must be able to have their own settings (in HKCU)