在终端服务器上安装MSI-收到错误消息,拒绝自定义操作服务器-错误的上下文 [英] MSI Install on Terminal Server - getting error Custom Action Server rejected - Wrong Context

查看:116
本文介绍了在终端服务器上安装MSI-收到错误消息,拒绝自定义操作服务器-错误的上下文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在终端服务器上安装软件时,出现以下错误.任何帮助表示赞赏.

When trying to install a software on a terminal server, we get the following error. Any help is appreciated.

msi安装日志显示以下错误:

msi install log shows the following error:

MSI (s) (1C:04) [07:27:28:750]: Executing op: ActionStart(Name=InstallODBC,Description=Installing ODBC components,)
Action 7:27:28: InstallODBC. Installing ODBC components
MSI (s) (1C:04) [07:27:28:750]: Executing op: ODBCInstallDriver(DriverKey=Microsoft FoxPro VFP Driver (*.dbf),Component={612B3EFA-F178-4C50-A049-B99BE6DCACE0},Folder=C:\Windows\SysWOW64\,Attribute_=Driver,Value_=vfpodbc.dll)
1: Microsoft FoxPro VFP Driver (*.dbf) 2: {612B3EFA-F178-4C50-A049-B99BE6DCACE0} 3: C:\Windows\SysWOW64\ 4: Driver 5: vfpodbc.dll 6: Setup 7: vfpodbc.dll 8: ConnectFunctions 9: YYN 10: SQLLevel 11: 0 12: APILevel 13: 0 14: FileUsage 15: 1 16: DriverODBCVer 17: 02.50 18: FileExtns 19: *.dbf,*.cdx,*.idx,*.fpt 
MSI (s) (1C:5C) [07:27:28:750]: Generating random cookie.
MSI (s) (1C:5C) [07:27:28:766]: Created Custom Action Server with PID 1876 (0x754).
MSI (s) (1C:10) [07:27:28:797]: Running as a service.
MSI (s) (1C:10) [07:27:28:797]: Custom Action Server rejected - Wrong Context
MSI (s) (1C:5C) [07:27:28:797]: CA Server Process has terminated.
MSI (s) (1C:04) [07:27:28:797]: Failed to get IMsiCustomAction*
Action ended 7:27:29: InstallFinalize. Return value 3.

同时,进程监视器日志显示安装程序进程msiexec正在对本地系统用户HKey_Users \ S-1-5-18尝试RegOpenKey.结果显示为错误的错误.

At the very same time, process monitor log shows that installer process msiexec is trying a RegOpenKey on HKey_Users\S-1-5-18 which is the Local System user. and the result shown is BAD IMPERSONATION.

我查了KB3072630-但这不适用于我们的机器.另外,我尝试了MS解决方法来添加注册表项,但这也无济于事.

I have looked up KB3072630 - but it did not apply to our machine. Plus, i tried the MS workaround to add a registry key and that did not help either.

我的错误类似于: https://community.flexerasoftware.com/showthread.php?219987-Microsoft-KB3072630-update-impact-on-InstallOCBC-action&s=8250ec9cbe80dab42bf7b49dcf86077c

推荐答案

是的,这是一个经典问题-终端服务器感知的自定义操作问题.您是否需要该组件,还是可以将其拆下来?我想您已经为测试做了. 更新:我认为您也需要其他组件.

Yes, that is a classic issue - the terminal server aware custom action issue. Do you need that component, or can you just rip it out? I guess you did for testing already. UPDATE: I see you need it for other components as well.

自从我查看终端服务器安装以来已经有好几年了,但是MSI SDK上有一些简短的部分:

It has been years since I looked at terminal server installations, but the MSI SDK has some brief sections on it:

  • 使用带有终端服务器的Windows Installer .围绕每个用户的数据和自定义操作模拟存在许多挑战.如果您的团队通常会负责此工作,那么我会让他们去做-否则会浪费时间吗?
  • 只需添加一下,我上次检查终端服务器上的自我修复功能通常是禁用的,因此除非您使用特殊的终端服务器方法,否则您不能使用自我修复功能为每个用户放置数据.
  • 添加了一个标记,以标记终端服务器知道的自定义操作.一些自定义操作可能应该被禁用-因为它们可能会做出疯狂的事情,但它们永远不会起作用.在每种情况下都必须确定.

  • Using Windows Installer with a Terminal Server. There are many challenges centering around per-user data and custom action impersonation and much more. If you have a team taking care of this normally I would get them to do it - just a waste of time otherwise?
  • Just want to add that last time I checked self-repair is normally disabled on terminal servers so you can't use self-repair to put data in place per-user, unless you use special terminal server means to do so.
  • There is a flag added to mark custom actions terminal server aware. Some custom actions should probably just be disabled - since they might do crazy stuff that will never work anyway. Has to be determined in each case.

  • 要禁用自定义操作:进行转换并将条件设置为0,或者如果已经存在条件,则添加:AND 0.那应该禁用自定义操作.

  • To disable a custom action: make a transform and set the condition to 0 or if there is a condition already, add: AND 0 to it. That should disable the custom action.

魔幻数字数据库中查找 msidbCustomActionTypeTSAware 标志:

Looking up the msidbCustomActionTypeTSAware flag in the Magic Number Database:

  • https://www.magnumdb.com/search?q=msidbCustomActionTypeTSAware
  • msidbCustomActionTypeTSAware = 0x00004000, // impersonate for per-machine installs on TS machines
  • (just showing you this resource, you see the flag in the second link above)

延迟的自定义操作在本地系统的上下文中运行,除非该操作具有 msidbCustomActionTypeTSAware 属性.即使自定义操作在非终端服务器的系统上模拟了用户,也是如此.请注意,如果具有msidbCustomActionTypeTSAware属性的自定义操作更改了用户的注册表,则安装程序不会自动确保也对计算机上每个用户的注册表进行了这些更改.

Deferred custom actions run in the context of the local system unless the action has the msidbCustomActionTypeTSAware attribute. This is true even if the custom action impersonates the user on a system that is not a terminal server. Note that if a custom action having the msidbCustomActionTypeTSAware attribute changes the user's registry, the installer does not automatically ensure that those changes are also made in the registry of every user on the computer.

所以我想您可以修复自定义操作表的条目 有问题的自定义操作,看看会发生什么.我想你加 4000,如下所示:自定义动作脚本内执行选项.按用户添加的数据可能不会进入所有用户配置单元.

So I suppose you can hotfix the Custom Action Table entries for the custom actions in question and see what happens. I suppose you add 4000 as shown here: Custom Action In-Script Execution Options. The per-user data added will supposedly not make it into all user hives.

这篇关于在终端服务器上安装MSI-收到错误消息,拒绝自定义操作服务器-错误的上下文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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