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

查看:189
本文介绍了用户注销后,通过交互式用户执行的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:\ Windows \ System32 [或SysWOW64] \ config \ systemprofile \ Desktop
  • 确保为运行该服务的用户配置了默认打印机
  • 更改Excel的DCOMCNFG设置(mmc -32,添加组件服务")以使用交互式帐户运行
  • 更改全局DCOM默认设置为允许服务在其下运行的用户本地访问,本地启动和本地激活

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

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