Problems creating a process from a .net service

K

kistealt

Hi folks,

i have the following problem using c# and .net.

I want to print pdf files by calling the Adobe Acrobat 4 command line
tool.
Here's my code

ProcessStartInfo psi = new ProcessStartInfo();

// Initialize the ProcessStartInfo structure
psi.FileName = "C:\\Programme\\Adobe\\Acrobat
4.0\\Reader\\ACRORD32.EXE";
psi.Arguments = " /n /t C:\\test.pdf \\\\DUSNBK0005\\HP5MP";
psi.WorkingDirectory = "C:\\Programme\\Adobe\\Acrobat 4.0\\Reader";

psi.UseShellExecute = true;
Process proc = new Process();
Process.Start(psi);

If i do this in a normal command line tool, everythink works fine.
If i do this in a running .Net Service, the ACRORD32.EXE is running as
a process, but it hangs and nothing happens.
What am i doing wrong?
I already allowed the service to interact with the desktop and tried
also to start the service with different users, but all time the same.

I'am using VS2003, Framework 1.1. SP1
It makes no differense, if the service runs on windows 2000 server or
Windows XP SP2.

Any help is very welcome

Regards

Frank
 
M

MatsonPP

I don't know the answer to your problem, but I wanted to let everyone
know that '@' will allow you to stop escaping.

psi.Arguments = " /n /t C:\\test.pdf \\\\DUSNBK0005\\HP5MP";

can now be

psi.Arguments = @" /n /t C:\test.pdf \\DUSNBK0005\HP5MP";
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top