[This is preliminary documentation and subject to change.]
For many standard folders, a qualified path can be obtained by calling SHGetSpecialFolderLocation with an appropriate CSIDL constant (CSIDL constants are defined in ShlObj.h, a Windows header file). The following standard folders are accessible in this way.
| Standard Folder | CSIDL Constant Name | Hex |
|---|---|---|
| Alternate Startup (All Users; DBCS) |
|
|
| Alternate Startup (user's; DBCS) |
|
|
| Application Data (user's profile) |
|
|
| Control Panel virtual folder |
|
|
| Cookies folder |
|
|
| Desktop (namespace root) |
|
|
| Desktop folder ("All Users" profile) |
|
|
| Desktop folder (user's profile) |
|
|
| Favorites folder (All Users profile) |
|
|
| Favorites folder (user's profile) |
|
|
| Fonts virtual folder |
|
|
| History folder |
|
|
| Internet Cache folder |
|
|
| Internet virtual folder |
|
|
| My Computer virtual folder |
|
|
| My Documents folder (user's) |
|
|
| Network Neighborhood root |
|
|
| Network Neighborhood directory |
|
|
| Personal folder (user's profile) |
|
|
| Printers virtual folder |
|
|
| PrintHood folder (user's profile) |
|
|
| Programs folder (under Start Menu in "All Users" profile) |
|
|
| Programs folder (under Start Menu in user's profile) |
|
|
| Recent folder (user's profile) |
|
|
| Recycle Bin folder |
|
|
| SendTo folder (user's profile) |
|
|
| Start Menu ("All Users" profile) |
|
|
| Start Menu (user's profile) |
|
|
| Startup folder ("All Users" profile) |
|
|
| Startup folder (user's profile) |
|
|
| Templates folder (user's profile) |
|
|
Other standard folders can also be located using the following environment variables.
| Standard Folder or Location | Environment Variable |
|---|---|
| System drive | %SystemDrive% |
| System root directory | %SystemRoot% |
| Windows folder | %windir% |
| Program Files folder | %ProgramFiles% |
| User's profile folder | %UserProfile% |
| Temporary folder (per user) | %Temp% |
Access to specific user profile folders such as My Documents or Application Data should be obtained through SHGetSpecialFolderLocation rather than by relying on a combination of an environment variable and the standard English folder name (such as %UserProfile%\Application Data\).