How to call EMF to Vector Command Line Server License from C# and Windows Service?

 

Hi,

We've just bought a license of emf2vec.exe yesterday and I registered it using

emf2vec.exe "-$" "XXXXXXXXXXXXXXXXXXXXXX"

It works OK when I call it in batch file, but when I call it from a Windows service application developed in c# with MS Visual Studio 2005, it does not work! ( see C# codes below)

Any help or suggestions on this will be greatly appreciated.
Regards,

Simplified version of C# codes:
...
Process myProcess = null;
myProcess = new Process();
paramStr = @" -xres 600 -yres 600 in.emf out.tif";
myProcess.StartInfo.FileName = @"C:\emf2vec\emf2vec.exe";
myProcess.StartInfo.Arguments = paramStr;
myProcess.StartInfo.CreateNoWindow = true;
myProcess.Start();
...

Customer

----------------------------------------------------------------------------

Please arrange your service run from Administrator user account to try again, we hoping you will get it work fine with this option.

VeryDOC

----------------------------------------------------------------------------

Thanks, but the windows service app had been run from the administrator's account all the time and I had also tried to set emf2vec.exe (version 2.0.0.1) in different compatibility modes and with and without the allow non-administrators to run this program checked.

By the way, the server on which the service app is running is MS Windows Server 2003 R2, Enterprise Edition, Service Pack 2

Hope you can think of something else I can try.
Thanks again,

Customer

----------------------------------------------------------------------------

Please consider this issue resolved: I created a Console application using C# to replace the window service application: emf2vec.exe works well when called from the console application.
Thanks,

Customer

----------------------------------------------------------------------------

Thanks for your message, yes, you are right, the Windows application can not be shown from a service, so the Windows Service application will simple hang, the console application can be called from Windows Service without this problem.

VeryDOC

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!