问题
Folks,
I have the exact same issue that's presented here, except that I'm trying automate Excel using a non-system (user) account. The solution of creating a desktop folder doesn't work, because the user already has a desktop folder. I can get the solution to work for the System Account just fine. I can also get it to work for the Administrator account, when logged-in. Is this in fact a Session 0/1 issue or is that still a red herring?
回答1:
Chase this down with SysInternals' ProcMon, probably the way Ogawa discovered his hack. You'll drown in the data but you'll have to find the registry or file access that fails. Ask more questions about it at superuser.com
Beware that this isn't just unsupported because of a missing file or registry key. These Office programs were designed to be used interactively. They'll put up a dialog when something goes wrong. On a desktop where nobody can hear it scream. Your service fails in a completely undiagnosable way, it just stops working and you cannot find out why.
回答2:
There seems to be no way to do this.
来源:https://stackoverflow.com/questions/5226473/excel-2007-automation-on-top-of-a-windows-server-2008-x64-non-system-user