views:

32

answers:

1

Hi,

I am starting software service as external .exe and than as windows services, but both time I am getting different results and wanted to ask what difference does it make with this two approaches and which one should be used if performance is the main criteria.

Thanks.

+1  A: 

In terms of runtime performance, it should make no difference whether your application is packaged and started as a Windows Service or as a "normal" executable application.

The one difference, potentially, is in startup times. The Windows Service may be (slightly) faster in startup, since it's launched by an already running application (svchost.exe), and not reliant on the desktop libraries. However, once it's running, the performance should be identical.

I'd focus more on what you want your application to do. Do you want it to run without a logged in user? If so, make a service. Do you want desktop interaction, or for it to run in a user's credentials? If so, go with a standard executable.

Reed Copsey
Ummm... Windows services aren't hosted in a running application (svchost). They run as stand-alone EXEs.
Larry Osterman
Very true. I edited to be more explicit - very poor wording on my part.
Reed Copsey