0

I have this command line:

LSPrintingDialog.exe -f "C:\Program Files\LightScribe Template Labeler\templatelabeler\content\templates\backgrounds\GiftTags.jpg" -n "HP dvd de8a4l rh61 211 (J:)" -i 0 -q draft -p J -c 1 -m 1

With CMD, I am able to call this command line directly, how can I call this command line through C#?

1
  • Note that that command line will only work on your machine; generalizing it to work on other machines will take non-trivial effort. Commented Jan 3, 2011 at 2:16

1 Answer 1

4

You need to call Process.Start(exePath, arguments) and accept answers to your questions.

Sign up to request clarification or add additional context in comments.

3 Comments

System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; proc.StartInfo.FileName = CMD CMD ="LSPrintingDialog.exe -f "C:\Program Files\LightScribe Template Labeler\templatelabeler\content\templates\backgrounds\GiftTags.jpg" -n "HP dvd de8a4l rh61 211 (J:)" -i 0 -q draft -p J -c 1 -m 1 "; proc.Start();
@ SlAKS , i have many errors for the command line message, do you have any adv?
You should call Process.Start on your actual command, not cmd.exe.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.