让我的应用程序受GPO控制 [英] Let my Application be controlled by GPOs

查看:111
本文介绍了让我的应用程序受GPO控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发Windows应用程序.我希望我的应用程序可以通过自己定义的GPO进行配置,以便系统管理员可以分别管理每个组和用户的应用程序行为. 我已经做了一些研究,但是我找不到合适的解决方案.

I am developing a windows application. I want my application to be configurable via own-defined GPOs, that the system administrator can manage my application behaviour for each group and user individually. I've done some research, but I just could not find a proper solution.

如果我创建一些自定义策略,它们如何在服务器上获得? 我认为该策略应由更改注册表项"组成.之后,我的应用程序使用本地计算机上的这些条目来配置自身.

If I create some custom policies, how do they get on the server? I think the policies should consist of "changing registry entries". After that, my application uses these entries on the local machine to configure itselft.

例如,我的应用程序有一个文件夹,该文件夹中正在存储数据.假设它默认为"C:\ data".此路径存储在特定的注册表项中.通过定义组策略,管理员可以更改此路径.因此,管理员在服务器端将路径设置为"C:\ subfolder \ data".我的本地应用程序现在应该使用此文件夹来存储数据.

For example my application has a Folder in which data is getting stored. Let's say it is "C:\data" by default. This path is stored in a specific registry entry. By defining a group policy, the administrator can change this path. So the administrator sets the path to "C:\subfolder\data" on the server side. My local application should now use this folder to store the data.

我不知道如何解决这个问题.有没有一种方法可以将组策略添加到服务器/域控制器上? 我想稍后再发布我的应用程序,因此,我绝对更喜欢使用安装程序包之类的解决方案.

I could not figure out how to solve this. is there a way to get the group policies onto the server/domain controller? I'd like to publish my application later, so I definitely prefer a solution using something like an installer package.

推荐答案

我认为策略应该由更改注册表项"组成.此后,我的应用程序使用本地计算机上的这些项进行自我配置."

"I think the policies should consist of "changing registry entries". After that, my application uses these entries on the local machine to configure itself."

是的,这是最好的方法.在HKLM\Software\YourAppNameHereHKCU\Software\YourAppNameHere下创建注册表配置(取决于您是要按用户配置还是按机器配置).

Yes that is the best way to do it. Create registry configuration under HKLM\Software\YourAppNameHere or HKCU\Software\YourAppNameHere (depending on whether you want per-user or per-machine config).

您的应用程序应该只阅读注册表项,而不必担心组策略.

Your application should just read the registry entry and not worry about group policies.

然后,您可以创建ADM或ADMX文件,将其安装在域控制器上,或者简单地记录注册表项,并让管理员创建自己的组策略或以其他方式部署注册表项.

You can then create ADM or ADMX files which you can install on the domain controller, or simply document the registry entries and let administrators create their own group policies or deploy the registry key in another way.

编辑:在此Microsoft KB文章中找到了一个创建仅部署注册表项的ADM或ADMX文件的好例子:

A good example of creating an ADM or ADMX file which just deploys registry keys is found in this Microsoft KB article:

这篇关于让我的应用程序受GPO控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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