SpecialDirectories.Programs Property

 

Gets a path name pointing to the Programs directory.

Namespace:   Microsoft.VisualBasic.FileIO
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

public static string Programs { get; }

Property Value

Type: System.String

The path to the Programs directory.

Exception Condition
DirectoryNotFoundException

The path is empty, usually because the operating system does not support the directory.

The SpecialDirectories object contains paths to commonly referenced directories. The Programs directory contains the user's program groups.

This example displays the path for the Programs directory in a MessageBox.

MsgBox(My.Computer.FileSystem.SpecialDirectories.Programs)

EnvironmentPermission

Controls access to system and user environment variables. Associated enumeration: Unrestricted.

FileIOPermission

Controls the ability to access files and folders. Associated enumeration: Unrestricted.

.NET Framework
Available since 2.0
Return to top
Show: