A pedant that hangs out in the dark corner-cases of the web.

Thursday, July 31, 2008

Windows Special Folders Support

Windows system/special folders, unlike Linux (which has a consistent, reliable filesystem heirarchy), can be in all kinds of crazy custom locations, or use localized text.

As a consequence, you cannot simply use a path to a special folder. You have to look it up first. Nearly all Microsoft APIs/platforms/technologies provide some way to look up these special folders. What's even more complicated is that these lookups seem to be about as varied as the folder names themselves.

Not only do newer technologies reflect completely new folders, as could be expected, but each API seems to provide access to a different subset of special folders, and use different names/keys for the folders, and sometimes provide multiple partial lists via different methods/lookups/constants. Say you want to look up the location of the Windows Recycle Bin, does your API refer to this as CSIDL_BITBUCKET or FOLDERID_RecycleBinFolder, or does it provide any access to it at all?

This reference aims to provide an overview of whether your API supports a given special folder, and where to look for it.

Windows Special Folder Environment Variables

  • ALLUSERSPROFILE
  • APPDATA
  • CommonProgramFiles
  • CommonProgramFiles(x86)
  • CommonProgramFilesW6432
  • ProgramFiles
  • ProgramFiles(x86)
  • ProgramFilesW6432
  • SystemDrive
  • SystemRoot
  • TEMP
  • TMP
  • USERPROFILE
  • windir
Windows XP Embedded uses numeric environment variables.

.NET System.Environment.SpecialFolder Enumeration

  • ApplicationData
  • CommonApplicationData
  • LocalApplicationData
  • Cookies
  • Desktop
  • Favorites
  • History
  • InternetCache
  • Programs
  • MyComputer
  • MyMusic
  • MyPictures
  • Recent
  • SendTo
  • StartMenu
  • Startup
  • System
  • Templates
  • DesktopDirectory
  • Personal
  • MyDocuments
  • ProgramFiles
  • CommonProgramFiles

.NET System.IO.Path Methods

  • GetTempPath()

Windows Scripting Host WshShell.SpecialFolders Collection

  • AllUsersDesktop
  • AllUsersStartMenu
  • AllUsersPrograms
  • AllUsersStartup
  • Desktop
  • Favorites
  • Fonts
  • MyDocuments
  • NetHood
  • PrintHood
  • Programs
  • Recent
  • SendTo
  • StartMenu
  • Startup
  • Templates

Windows Scripting Host FileSystemObject.GetSpecialFolder() Method Parameters

  • SystemFolder
  • TemporaryFolder
  • WindowsFolder

Windows CLSID GUIDs

Administrative Tools{D20EA4E1-3957-11d2-A40B-0C5020524153}
Briefcase{85BBD920-42A0-1069-A2E4-08002B30309D}
Control Panel{21EC2020-3AEA-1069-A2DD-08002B30309D}
Fonts{D20EA4E1-3957-11d2-A40B-0C5020524152}
History{FF393560-C2A7-11CF-BFF4-444553540000}
Inbox{00020D75-0000-0000-C000-000000000046}
Microsoft Network{00028B00-0000-0000-C000-000000000046}
My Computer{20D04FE0-3AEA-1069-A2D8-08002B30309D}
My Documents{450D8FBA-AD25-11D0-98A8-0800361B1103}
My Network Places{208D2C60-3AEA-1069-A2D7-08002B30309D}
Network Connections{7007ACC7-3202-11D1-AAD2-00805FC1270E}
Printers and Faxes{2227A280-3AEA-1069-A2DE-08002B30309D}
Recycle Bin{645FF040-5081-101B-9F08-00AA002F954E}
Scanners and Cameras{E211B736-43FD-11D1-9EFB-0000F8757FCD}
Scheduled Tasks{D6277990-4C6A-11CF-8D87-00AA0060F5BF}
Temporary Internet Files{7BD29E00-76C1-11CF-9DD0-00A0C9034933}
Web Folders{BDEADF00-C265-11D0-BCED-00A0C90AB50F}

Win32 CSIDL Constants

  • CSIDL_ADMINTOOLS
  • CSIDL_ALTSTARTUP
  • CSIDL_APPDATA
  • CSIDL_BITBUCKET
  • CSIDL_CDBURN_AREA
  • CSIDL_COMMON_ADMINTOOLS
  • CSIDL_COMMON_ALTSTARTUP
  • CSIDL_COMMON_APPDATA
  • CSIDL_COMMON_DESKTOPDIRECTORY
  • CSIDL_COMMON_DOCUMENTS
  • CSIDL_COMMON_FAVORITES
  • CSIDL_COMMON_MUSIC
  • CSIDL_COMMON_OEM_LINKS
  • CSIDL_COMMON_PICTURES
  • CSIDL_COMMON_PROGRAMS
  • CSIDL_COMMON_STARTMENU
  • CSIDL_COMMON_STARTUP
  • CSIDL_COMMON_TEMPLATES
  • CSIDL_COMMON_VIDEO
  • CSIDL_COMPUTERSNEARME
  • CSIDL_CONNECTIONS
  • CSIDL_CONTROLS
  • CSIDL_COOKIES
  • CSIDL_DESKTOP
  • CSIDL_DESKTOPDIRECTORY
  • CSIDL_DRIVES
  • CSIDL_FAVORITES
  • CSIDL_FONTS
  • CSIDL_HISTORY
  • CSIDL_INTERNET
  • CSIDL_INTERNET_CACHE
  • CSIDL_LOCAL_APPDATA
  • CSIDL_MYDOCUMENTS
  • CSIDL_MYMUSIC
  • CSIDL_MYPICTURES
  • CSIDL_MYVIDEO
  • CSIDL_NETHOOD
  • CSIDL_NETWORK
  • CSIDL_PERSONAL
  • CSIDL_PRINTERS
  • CSIDL_PRINTHOOD
  • CSIDL_PROFILE
  • CSIDL_PROGRAM_FILES
  • CSIDL_PROGRAM_FILESX86
  • CSIDL_PROGRAM_FILES_COMMON
  • CSIDL_PROGRAM_FILES_COMMONX86
  • CSIDL_PROGRAMS
  • CSIDL_RECENT
  • CSIDL_RESOURCES
  • CSIDL_RESOURCES_LOCALIZED
  • CSIDL_SENDTO
  • CSIDL_STARTMENU
  • CSIDL_STARTUP
  • CSIDL_SYSTEM
  • CSIDL_SYSTEMX86
  • CSIDL_TEMPLATES
  • CSIDL_WINDOWS

Windows Vista KNOWNFOLDERID

  • FOLDERID_AddNewPrograms
  • FOLDERID_AdminTools
  • FOLDERID_AppUpdates
  • FOLDERID_CDBurning
  • FOLDERID_ChangeRemovePrograms
  • FOLDERID_CommonAdminTools
  • FOLDERID_CommonOEMLinks
  • FOLDERID_CommonPrograms
  • FOLDERID_CommonStartMenu
  • FOLDERID_CommonStartup
  • FOLDERID_CommonTemplates
  • FOLDERID_ComputerFolder
  • FOLDERID_ConflictFolder
  • FOLDERID_ConnectionsFolder
  • FOLDERID_Contacts
  • FOLDERID_ControlPanelFolder
  • FOLDERID_Cookies
  • FOLDERID_Desktop
  • FOLDERID_Documents
  • FOLDERID_Downloads
  • FOLDERID_Favorites
  • FOLDERID_Fonts
  • FOLDERID_Games
  • FOLDERID_GameTasks
  • FOLDERID_History
  • FOLDERID_InternetCache
  • FOLDERID_InternetFolder
  • FOLDERID_Links
  • FOLDERID_LocalAppData
  • FOLDERID_LocalAppDataLow
  • FOLDERID_LocalizedResourcesDir
  • FOLDERID_Music
  • FOLDERID_NetHood
  • FOLDERID_NetworkFolder
  • FOLDERID_OriginalImages
  • FOLDERID_PhotoAlbums
  • FOLDERID_Pictures
  • FOLDERID_Playlists
  • FOLDERID_PrintersFolder
  • FOLDERID_PrintHood
  • FOLDERID_Profile
  • FOLDERID_ProgramData
  • FOLDERID_ProgramFiles
  • FOLDERID_ProgramFilesX64
  • FOLDERID_ProgramFilesX86
  • FOLDERID_ProgramFilesCommon
  • FOLDERID_ProgramFilesCommonX64
  • FOLDERID_ProgramFilesCommonX86
  • FOLDERID_Programs
  • FOLDERID_Public
  • FOLDERID_PublicDesktop
  • FOLDERID_PublicDocuments
  • FOLDERID_PublicDownloads
  • FOLDERID_PublicGameTasks
  • FOLDERID_PublicMusic
  • FOLDERID_PublicPictures
  • FOLDERID_PublicVideos
  • FOLDERID_QuickLaunch
  • FOLDERID_Recent
  • FOLDERID_RecordedTV
  • FOLDERID_RecycleBinFolder
  • FOLDERID_ResourceDir
  • FOLDERID_RoamingAppData
  • FOLDERID_SampleMusic
  • FOLDERID_SamplePictures
  • FOLDERID_SamplePlaylists
  • FOLDERID_SampleVideos
  • FOLDERID_SavedGames
  • FOLDERID_SavedSearches
  • FOLDERID_SEARCH_CSC
  • FOLDERID_SEARCH_MAPI
  • FOLDERID_SearchHome
  • FOLDERID_SendTo
  • FOLDERID_SidebarDefaultParts
  • FOLDERID_SidebarParts
  • FOLDERID_StartMenu
  • FOLDERID_Startup
  • FOLDERID_SyncManagerFolder
  • FOLDERID_SyncResultsFolder
  • FOLDERID_SyncSetupFolder
  • FOLDERID_System
  • FOLDERID_SystemX86
  • FOLDERID_Templates
  • FOLDERID_TreeProperties
  • FOLDERID_UserProfiles
  • FOLDERID_UsersFiles
  • FOLDERID_Videos
  • FOLDERID_Windows

TweakUI Special Folders

  • CD Burning
  • Desktop
  • Document Templates
  • Favorites
  • Installation Path
  • My Documents
  • My Music
  • My Pictures
  • My Video
  • Programs
  • Send To
  • Shared Music
  • Shared Pictures
  • Shared Video
  • Start Menu
  • Startup

Visual Studio 2008 Setup Project → Add Special Folder

  • Common Files Folder
  • Common Files (64-bit) Folder
  • Fonts Folder
  • Program Files Folder
  • Program Files (64-bit) Folder
  • System Folder
  • System (64-bit) Folder
  • User's Application Data Folder
  • User's Desktop
  • User's Favorites Folder
  • User's Personal Data Folder
  • User's Programs Menu
  • User's Send To Menu
  • User's Start Menu
  • User's Startup Folder
  • User's Template Folder
  • Windows Folder
  • Global Assembly Cache Folder

Visual Studio 2008 Setup Project → File Installation Properties → DefaultLocation [SpecialFolders]

  • AdminToolsFolder
  • AppDataFolder
  • CommonAppDataFolder
  • CommonFiles64Folder
  • CommonFilesFolder
  • DesktopFolder
  • FavoritesFolder
  • FontsFolder
  • LocalAppDataFolder
  • MyPicturesFolder
  • PersonalFolder
  • ProgramFiles64Folder
  • ProgramFilesFolder
  • ProgramMenuFolder
  • SendToFolder
  • StartMenuFolder
  • StartupFolder
  • System16Folder
  • System64Folder
  • SystemFolder
  • TempFolder
  • TemplateFolder
  • WindowsFolder
  • WindowsVolume

2 comments:

Anonymous said...

It's remarkable to pay a quick visit this web page and reading the views of all friends about this article, while I am also eager of getting know-how.

Here is my webpage; cash advance in california

Anonymous said...

http://www.paulawhite.org/cheap-soccer-jerseys most jobs purcɦase.Times аre cɦanging, so
it is extra accepted to make sure you pick odd οr mabe skilled the гight
gifts, and a lot of bаgs аre reasonable online gamе.

Horton Excitement Teammates Following Match Four