logo       

Windows Service question: msg#00069

Subject: Windows Service question
Hi,

I am fairly new to dotnet and windows services so I apologize if this is 
something you all have already discussed.

I need to start and stop Excel from a windows service. My service is working 
just fine reading/writing files and other basic tasks. However, when the 
excel application is created, my service tries to install Excel when it is 
run as "LocalSystem". When I run it as a user with administrative privileges 
an error is returned (the error says that no error was returned but an error 
occurred). I am using C#, .NET 1.1 on windows 2000.

protected override void OnStart(string[] args)
{
       Excel.Application xl = new Excel.Application (); // code stops here, 
excel application never created
       // do something, exit excel, clean up
       ...
}

Is it not possible to start Excel from a Windows Service? I have tried 
everything I can think of on the adminstration side, now I am trying to 
solve this programmatically. I have this same code in another application 
and it works just fine. The UI doesn't come up and isn't needed. Has anyone 
encountered this problem or have any suggestions?

Thanks




------------------------ Yahoo! Groups Sponsor --------------------~--> 
$4.98 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/Q7_YsB/neXJAA/yQLSAA/dpFolB/TM
--------------------------------------------------------------------~-> 

 


<Prev in Thread] Current Thread [Next in Thread>