当用户注销时,通过交互式用户的 Excel COM 自动化停止工作 [英] Excel COM automation via interactive user stops working when user logs off

查看:23
本文介绍了当用户注销时,通过交互式用户的 Excel COM 自动化停止工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个服务器应用程序,它使用 Excel 2007 COM 自动化来转换一些 xls 文件.它在 Windows 数据中心实例上作为服务启动,在自己的用户下运行,我必须更改 DCOM 安全设置(以交互用户身份启动")才能使其工作.

I have developed a server app that uses Excel 2007 COM automation to convert some xls files. It is started as a service on a Windows Datacenter instance, running under its own user, and I had to change DCOM security settings ("launch as interactive user") to make it work.

问题是,当我(通过 RDP)注销时,它停止工作.我登录,它又工作了.

The problem is, when I log off (via RDP), it stops working. I log on, it works again.

有人遇到过同样的问题吗?

Has anyone had the same problem?

推荐答案

好的,所以如果没有交互式用户,我无法让 Excel 运行,再多的 DCOMCNFG 技巧都做不到.所以我只是为运行服务的用户配置了自动登录(参见 http://support.microsoft.com/kb/315231 获取说明).

Ok, so I couldn't get Excel to operate without an interactive user, no amount of DCOMCNFG trickery would do. So I simply configured autologin for the user the service is running under (see http://support.microsoft.com/kb/315231 for instructions).

这会导致在服务器启动时,该用户将作为交互式控制台会话登录.与 RDP 会话不同,这是永久性的,让 Excel 满意.

This has the effect that on server bootup, that user will login as an interactive console session. Unlike RDP sessions, this is permanent and makes Excel happy.

给必须做类似事情的可怜人的其他提示:

Other hints for the poors souls who have to do something similar:

  • 创建文件夹 C:WindowsSystem32[或 SysWOW64]configsystemprofileDesktop
  • 确保为运行该服务的用户配置了默认打印机
  • 更改 Excel 的 DCOMCNFG 设置(mmc -32,添加组件服务")以使用交互式帐户运行
  • 更改全局 DCOM 默认值以允许运行服务的用户进行本地访问、本地启动和本地激活

这篇关于当用户注销时,通过交互式用户的 Excel COM 自动化停止工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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