Managing Processes

You use the System.Diagnostics.Process class to manage processes on your machine.

This class offers both shared and instance members so that you can launch an external process but also get a reference to one or more processes. The following code shows how to launch an external process via the shared implementation of the Start method:

Process.Start("Notepad.exe")

Any call to the Process.Start method will return a Process object. You can also specify arguments for the process by specifying the second parameter for the method as follows:

Process.Start("Notepad.exe", "C:\aFile.txt")

One of the most important features of the Start method is that you can also supply the username, password, and domain ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.