The System.Diagnostics.Process class provides several methods to launch and controls other Windows processes. For example, the following code sample shows how to run Notepad, pass arguments to it, and run it from inside a given intial directory:
' this code assumes that you have used this Imports statement' Imports System.DiagnosticsDim proc As New Process()' Prepare to run Notepad and load C:Autoexec.bat in it.proc.StartInfo.FileName = "Notepad.exe"' (Change the following statement to match your system.)proc.StartInfo.WorkingDirectory = "c:winnt"proc.StartInfo.Arguments = "c:autoexec.bat"' Run it.proc.Start()