Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Environment.ProcessPath Property

Definition

Namespace:
System
Assemblies:
netstandard.dll, System.Runtime.dll
Source:
Environment.cs
Source:
Environment.cs
Source:
Environment.cs
Source:
Environment.cs
Source:
Environment.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Returns the path of the executable that started the currently executing process. Returns null when the path is not available.

public:
 static property System::String ^ ProcessPath { System::String ^ get(); };
public static string? ProcessPath { get; }
static member ProcessPath : string
Public Shared ReadOnly Property ProcessPath As String

Property Value

The path of the executable that started the currently executing process.

Remarks

If the executable is renamed or deleted before this property is first accessed, the return value is undefined and depends on the operating system.

Applies to


Feedback

Was this page helpful?