Process.Start

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Franky

    #1

    Process.Start

    I try to run this:

    string StrCmd = " -S MyServer -U sa -P sa-d DBTest -n -u >>
    C:\\test\\Resul t_TestPatch.sql -i C:\\test\\TestP atch.sql ";

    Process.Start(" osql.exe", StrCmd);

    But nothing apend, no error no result... If I cpy paste this code in the
    Run (in start menu ) it works!

    Someone can help me?
  • Cor Ligthert

    #2
    Re: Process.Start

    Franky,

    Have a look at this little sample.

    \\\
    System.Diagnost ics.Process p =
    new System.Diagnost ics.Process();
    System.Diagnost ics.ProcessStar tInfo pi =
    new System.Diagnost ics.ProcessStar tInfo();
    pi.Arguments = "c:\\windows\\w in.ini";
    pi.FileName = "notepad.ex e";
    p.StartInfo = pi;
    p.Start();
    ///

    I hope this helps,

    Cor


    Comment

    Working...