Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calling an executable from code

Status
Not open for further replies.

jconner

Programmer
Oct 26, 2003
6
US
Hey guys...sorry for the newbie question here, but I'm wanting to execute the BCP command utility (bcp.exe) from code (VB.NET). The app allows the user to plug in the command line switches and then needs to call the executable. I'll build the command line string with all the switches, but I don't know what the best way is to call the executable.

Any advice or help would be greatly appreciated! Thanks!
 
Dim p() As System.Diagnostics.Process = System.Diagnostics.Process.GetProcessesByName("outlook")

If p.Length = 0 Then
System.Diagnostics.Process.Start(BCP.exe)
Else
MessageBox.Show("BCP running!")
End If


Nouman Zaheer
Software Engineer
MSR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top