This documentation is archived and is not being maintained.

Process.ProcessName Property

Gets the name of the process.

[Visual Basic]
Public ReadOnly Property ProcessName As String
public string ProcessName {get;}
public: __property String* get_ProcessName();
public function get ProcessName() : String;

Property Value

The name that the system uses to identify the process to the user.


Exception Type Condition
SystemException The process does not have an identifier, or no process is associated with the Process.


The associated process has exited.


The ProcessName property holds an executable file name, such as Outlook, that does not include the .exe extension or the path. It is helpful for getting and manipulating all the processes that are associated with the same executable file.

Note   The ProcessName property holds up to fifteen characters.

You can call GetProcessesByName, passing it an executable file name, to retrieve an array that contains every running instance on the specified computer. You can use this array, for example, to shut down all the running instances of the executable file.

Windows 98 Platform Note:  This property is not available on this platform if you started the process with ProcessStartInfo.UseShellExecute set to true.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

Process Class | Process Members | System.Diagnostics Namespace | GetProcessesByName