Microsoft Recommended Program Directories
Where can I find a listing of what Microsoft recomme开发者_如何学编程nds for program install directories, application data, etc? (e.g. Best Practices)
There is the Environment.SpecialFolder enum.
The comprehensive document on the subject is the "Windows User Experience", which used to be published as a book, but can now be found online in many places (such as http://www.scribd.com/doc/36857902/Windows-User-Experience)
Windows File System Namespace Usage Guidelines: http://www.microsoft.com/downloads/details.aspx?FamilyID=88AD7E7C-4068-48B8-9503-E160A6693BBA&displaylang=en
Download the PDF.
Most of the document is specific to Windows Vista. The last section, titled "Accessing Well Known Folder Locations," discusses the SHGetFolderPath
(Windows XP and earlier) and SHGetKnownFolderPath
(Windows Vista) functions, which are what the .NET Environment.GetFolderPath
method relies upon.
The Environment.SpecialFolder
enumeration has been greatly expanded in .NET 4.0. It includes a lot more values than the 3.5 version did.
精彩评论