Note that there are some explanatory texts on larger screens.

plurals
  1. POpass multiple arguments to an EXE from Windows form Application
    primarykey
    data
    text
    <p>I have an app.exe application that asks to enter <strong>input path</strong> string, once i enter, it asks <strong>output path</strong> string... now when i enter, app.exe perform some operation</p> <p>i need to pass these paths from my Window Form Application i saw a lot of questions like this but could not implement what i require because i never worked with processes and Stream Reader or Writer any help please... examples will be thanked.. thank you..</p> <pre><code> string input = @"C:\Documents and Settings\pankaj\Desktop\My File\greetingsfreinds.ppt"; string output = @"C:\Documents and Settings\pankaj\Desktop\test"; Process process = new Process(); process.StartInfo.FileName = @"C:\Program Files\Wondershare\MyApp\app.exe"; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = false; process.StartInfo.RedirectStandardInput = true; process.Start(); process.WaitForExit(3000); process.Close(); </code></pre> <hr> <p>ok i tried that but its giving some exception <strong>StandardOut has not been redirected or the process hasn't started yet</strong>... my code was</p> <pre><code> string input = @"C:\Documents and Settings\pankaj\Desktop\My File\greetingsfreinds.ppt"; string output = @"C:\Documents and Settings\pankaj\Desktop\test"; Process process = new Process(); process.StartInfo.FileName = @"C:\Program Files\Wondershare\MyApp\app.exe"; process.StartInfo.UseShellExecute = false; process.StartInfo.CreateNoWindow = false; process.StartInfo.RedirectStandardInput = true; process.StartInfo.Arguments = input + ";" + output; process.Start(); string Strout = process.StandardOutput.ReadToEnd(); process.WaitForExit(); process.Close(); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload