在Windows Server 2003上更新每个配置文件的注册表 [英] Updating every profile's registry on Windows Server 2003

查看:154
本文介绍了在Windows Server 2003上更新每个配置文件的注册表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用于终端服务的Windows Server 2003系统.我们不使用漫游配置文件.我们不使用登录脚本.我大约有三十到四十个帐户登录到该系统,因此具有本地配置文件.

I have a Windows Server 2003 system that is used for terminal services. We do not use roaming profiles. We do not use login scripts. I have about thirty to fourty accounts that log into this system and as such have local profiles.

安装到此系统上的一个软件包使用HKCU/软件注册表树进行许可,因此每个用户在其本地配置文件中都具有许可密钥.

One of the software packages that are installed onto this system uses HKCU/Software reg tree for its licensing and so each user has the license key in their local profile.

如何确定性地更新所有这些不同的配置文件注册表?

How can I update all of these different profiles registries in a deterministic manner?

推荐答案

不再建议使用Active Setup (原始来源).


有几种方法可以实现您想要的目标-一种比另一种笨.终端服务器可能是部署的噩梦-用户可能没有运行 msiexec.exe 的权限,因此MSI自修复可能会失败.这就是为什么我通常更倾向于使用批处理文件脚本 reg文件来解决您面临的情况.


There are several ways to achieve what you want - one clunkier than the other. Terminal servers can be a deployment nightmare - users may not have rights to run msiexec.exe and hence MSI self-repair could fail. That's why I generally prefer to use batch files, scripts or reg files for the kind of situation you are facing.

我将使用Microsoft的活动设置功能.这只是功能的奇特名称,它使您可以在登录时每个配置文件运行一次".这是一个很好的解释: http://www.etlengineering.com/installer/activesetup .txt

I would use Microsoft's Active Setup feature. This is just a fancy name for a feature which allows you to "run something once per profile on login". Here is a good explanation: http://www.etlengineering.com/installer/activesetup.txt

以下是MSI文件(这是* .reg文件的内容)的示例活动设置项:

Here is a sample active-setup entry for an MSI file (this is the content of a *.reg file):

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\[ProductCode]]
"StubPath"="[SystemFolder]msiexec.exe /q /fou [ProductCode]"

"StubPath"命令可以是任何可运行的"命令,在您的情况下,我建议不要运行msiexec.exe,而是通过cscript.exe或其他批处理机制(CMD,REG,Etc ...)运行vbscript. .原因是我上面所说的:可能不允许终端服务器用户运行msiexec.exe.换句话说,是这样的:

The "StubPath" command can be anything "runnable", and in your case I would suggest not running msiexec.exe but rather a vbscript via cscript.exe or some other batch mechanism (CMD, REG, Etc...). The reason is what I stated above: msiexec.exe may not be allowed to run for terminal server users. In other words, something like this:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Active Setup\Installed Components\MyProduct]
"StubPath"="[SystemFolder]cmd.exe /k C:\SomeScript.cmd"


还有其他方法可以将数据添加到每个用户的个人资料,例如 使用广告中的MSI快捷方式和自我修复 ,但我不建议将其用于终端服务器.有关将MSI文件用于注册表设置的问题的信息,请参见 此serverfault.com答案 .


There are other ways to add data to each user's profile such as using advertised MSI shortcuts and self-repair, but I wouldn't recommend that for terminal servers. See this serverfault.com answer for information on problems with the use of MSI files for registry settings.

这篇关于在Windows Server 2003上更新每个配置文件的注册表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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