Compartir a través de


Environment.SpecialFolder Enumeration

Microsoft Silverlight will reach end of support after October 2021. Learn more.

When it is called by trusted applications, specifies enumerated constants used to retrieve directory paths to system special folders.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
<ComVisibleAttribute(True)> _
Public Enumeration SpecialFolder
[ComVisibleAttribute(true)]
public enum SpecialFolder

Members

Member name Description
Supported by Silverlight for Windows PhoneSupported by Xbox 360 ApplicationData The directory that serves as a common repository for application-specific data for the current roaming user.

A roaming user works on more than one computer on a network. A roaming user's profile is kept on a server on the network and is loaded onto a system when the user logs on.

CommonApplicationData The directory that serves as a common repository for application-specific data that is used by all users.
LocalApplicationData The directory that serves as a common repository for application-specific data that is used by the current, non-roaming user.
Cookies The directory that serves as a common repository for Internet cookies.
Desktop The logical Desktop rather than the physical file system location.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Favorites The directory that serves as a common repository for the user's favorite items.
History The directory that serves as a common repository for Internet history items.
InternetCache The directory that serves as a common repository for temporary Internet files.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Programs The directory that contains the user's program groups.
MyComputer The "My Computer" folder.
NoteNote:
The MyComputer constant always yields the empty string ("") because no path is defined for the My Computer folder.
MyMusic The "My Music" folder.
MyPictures The "My Pictures" folder.
MyVideos The "My Videos" folder.
Recent The directory that contains the user's most recently used documents.
SendTo The directory that contains the Send To menu items.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 StartMenu The directory that contains the Start menu items.
Supported by Silverlight for Windows PhoneSupported by Xbox 360 Startup The directory that corresponds to the user's Startup program group.

The system starts these programs whenever a user logs on or starts Windows NT or later, or starts Windows 98.

System The System directory.
Templates The directory that serves as a common repository for document templates.
DesktopDirectory The directory used to physically store file objects on the desktop.

Do not confuse this directory with the desktop folder itself, which is a virtual folder.

Supported by Silverlight for Windows PhoneSupported by Xbox 360 Personal The directory that serves as a common repository for documents.
MyDocuments The "My Documents" folder.
ProgramFiles The program files directory.
CommonProgramFiles The directory for components that are shared across applications.

Remarks

The system special folders are folders such as Program Files, Programs, System, or Startup, which contain common information. Special folders are set by default by the system, or explicitly by the user, when installing a version of Windows.

The GetFolderPath method uses these enumerated constants to designate the special folder path to retrieve.

Platform Notes

Silverlight for Windows Phone Silverlight for Windows Phone

This type is present to support the .NET Compact Framework infrastructure in Silverlight for Windows Phone, and it is not intended to be used in your application code.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

See Also

Reference