Re: Script Host Client launched from Windows Service
"DavidRF" <DavidRF@discussions.microsoft.com> wrote in message
> Just to clarify. The Windows Service process itself does not run
> ScriptHost. The Windows Service spawns an independent ScriptHost
> which reads the Excel file, processes it internally, and writes one or
> tab-delimited files which can be imported natively into our main
And ... the ScriptHost executable is running in _what_ session? The same
session as the service, with no access to an interactive user or a desktop.
Microsoft has repeatedly dictated that they do not support Office Automation
in anything other than an interactive desktop.
> Its our way of integrated our application with Microsoft Excel, though we
> are encountering the same ScriptHost/Automation problem with other
> as well.
> Has anyone run into the same problem? Is there some setting, flag, or
> function argument than can be set so that Script Host processes launched
> by a
> Windows Service can open files?
Every time I've tried to do Office Automation from a service in XP, it's
worked... more or less, most of the time. Every time I've asked Microsoft
for help, they've said "it was never meant to run from a service, that's
unsupported", so I've done it some other way.
That's not to say that there isn't a solution out there - just that I don't
think you'll get any officially sanctioned solutions, and unofficial
solutions have a habit of being wiped out by the next patch, the next
service pack, or the next release, so I avoid them as much as possible.