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()
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.






















