Process.Start

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I try to run this:

string StrCmd = " -S MyServer -U sa -P sa-d DBTest -n -u >>
C:\\test\\Result_TestPatch.sql -i C:\\test\\TestPatch.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?
 
Franky,

Have a look at this little sample.

\\\
System.Diagnostics.Process p =
new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo pi =
new System.Diagnostics.ProcessStartInfo();
pi.Arguments = "c:\\windows\\win.ini";
pi.FileName = "notepad.exe";
p.StartInfo = pi;
p.Start();
///

I hope this helps,

Cor
 
Back
Top