How do I use multiple verbs when starting a process?

I am currently just printing a doc file using the following code:

System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo = new System.Diagnostics.ProcessStartInfo()
{
    CreateNoWindow = false,
    Verb = "print",
    FileName = fileName //put the correct path here
};
p.Start();

      

What can I do to save the file after printing, or open the file first and then print it. Can I use more than one verb with a process?

+3


source to share


1 answer


You can not.

Verbs are implemented as complete command lines: each verb matches a complete command line as defined in the registry. So each new verb starts a completely different process, it just happens (usually) points to the same executable binary with different command line arguments.



To control the application in more detail, you will have to resort to program automation techniques, if available.

You can learn more about this here and here.

+1


source







All Articles