Reputation: 7922
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.
The problem is, when I log off (via RDP), it stops working. I log on, it works again.
Has anyone had the same problem?
Upvotes: 14
Views: 23567
Reputation: 1
this fixed my issue. Windows 10 security uodates were applied to the server which is when the issue first started happening. After changing the interactive user setting everything worked as usual once again.
Upvotes: 0
Reputation: 7922
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).
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:
Upvotes: 11
Reputation: 101
Server side:
A) Switch "Interactive User" to "This User".
B) "This User" only works after creating these folders :
C) Wait for it... Step B) triggers Windows to auto create:
Note the definition of "Interactive User" is to piggybacked on whatever is the active logged in user to the server. Thus failure to launch MS Office when no user is active on the server.
I.e., for me, the solution was a hybrid of the already proposed solutions. I used Office 2013 (x86) on Win 2012R2. My issue was instead with Word (to use WordToPDF).
Details for Step B:
Details for Step C:
Upvotes: 7
Reputation: 1
If the account which is running EXCEL is administrator then this will work:
For 64-bit (x64), create this folder: C:\Windows\SysWOW64\config\systemprofile\Desktop For 32-bit (x86), create this folder: C:\Windows\System32\config\systemprofile\Desktop Otherwise To resolve this issue follow these steps:
Upvotes: 0
Reputation: 3565
I've had this issue, and I found that the answer is actually in the DCOM Configuration.
I did the following to resolve the issue:
Identity
tabThis User
You may need to go to the Security
tab and ensure the user you've specified above has appropriate Permissions.
After doing this, I was able to Log Off the Server while still using the Excel COM Automation libraries.
Upvotes: 5
Reputation: 33677
There's a thing called Excel Services which is supposed to make it possible to run Excel as a service using SharePoint, which would allow it to run unattended with nobody logged in.
Upvotes: 2