Page 1 of 1

Runing ImageMagic under services with window services .net

Posted: 2009-05-18T07:20:25-07:00
by zOro
Hi all ,
I have console application (C#) that convert pdf file to tiff
using the -format tiff *.pdf and it's work fine .

I take the same code and create window service running under xp services ,

and i get the error :

from StandardOutput.ReadToEnd() i get :

unable to open image `*.pdf': No such file or directory @ blob.c/OpenBlob/2440.

from StandardError.ReadToEnd(); i get :

unable to open image `*.pdf': Invalid argument @ blob.c/OpenBlob/2440.

what can be the problem ?...

Thanks.

Re: Runing ImageMagic under services with window services .net

Posted: 2009-05-18T08:00:18-07:00
by zOro
Found it ,

When running as console application the Process StartInfo.Arguments :
" -format tiff *.pdf " work fine.

but when running as service StartInfo.Arguments
must have " -format tiff C:\temp\Input\*.pdf "

even though my exe file located at the same directory with mogrify.exe and convert.exe.