awj100

I'm building an application which uses the console interface of the Nokia Multimedia Converter and passing in switches to control the resultant file. I can currently run this in 2 ways:

1. Straight from the command line (manually). Using this method it takes about 4 seconds to complete.

2. Running an application which starts the Converter as a new Process and passes in the switches through the command line arguments method. This requires a similar amount of time to 1.

However, I actually want to run the app as a Windows Service. When I start the Converter off as a new Process from within the Service and pass the switches/arguments (exactly the same code as used in 2) it can take up to a minute to return the resultant file.

Can anyone explain to me why there is such a difference in processing time and how I can reduce this



Re: Visual C# General Running a console app from Windows Service

Mark Betz

I would be interested to see if changing the account that the service is running under to the user account that currently owns the interactive session would affect the time it takes to spawn the process and write the resulting file. Just a shot in the dark.



Re: Visual C# General Running a console app from Windows Service

awj100

The service currently rnus under the System account. If I change it to any of the other accounts then I lose access to SQL Server.

Should this be the case and which account would you suggest trying





Re: Visual C# General Running a console app from Windows Service

Mark Betz

It was just a guess, to be honest. I think your only other alternative is to throw some logging in a script or the service, and see how much of the time is actually spent inside the spawned process. That, or run it in the debugger and profile from there.