Home‎ > ‎My Notebook‎ > ‎

Vista CSIDL Folder Locations


Special folders

I wrote a little app to output all folder locations — output (below) comes from Vista and Windows XP using CSIDL values

Note: A CSIDL is used in conjunction with one of four Shell functions, SHGetFolderLocation, SHGetFolderPath, SHGetSpecialFolderLocation, and SHGetSpecialFolderPath, to retrieve a special folder's path or pointer to an item identifier list (PIDL).

Windows Vista / Windows 7

csidl_profile C:\Users\<user>
csidl_desktop C:\Users\<user>\Desktop
csidl_programs C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
csidl_personal C:\Users\<user>\Documents
csidl_favorites C:\Users\<user>\Favorites
csidl_startup C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
csidl_recent C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent
csidl_sendto C:\Users\<user>\AppData\Roaming\Microsoft\Windows\SendTo
csidl_startmenu C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu
csidl_desktopdirectory C:\Users\<user>\Desktop
csidl_nethood C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Network Shortcuts
csidl_templates C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Templates
csidl_appdata C:\Users\<user>\AppData\Roaming
csidl_printhood C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Printer Shortcuts
csidl_localappdata C:\Users\<user>\AppData\Local
csidl_commonfavorites C:\Users\<user>\Favorites
csidl_internetcache C:\Users\<user>\AppData\Local\Microsoft\Windows\Temporary Internet Files
csidl_cookies C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Cookies
csidl_history C:\Users\<user>\AppData\Local\Microsoft\Windows\History
csidl_mypictures C:\Users\<user>\Pictures
csidl_admintools C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Administrative Tools

csidl_altstartup C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
csidl_commonaltstartup C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
csidl_programfilesx86 C:\Program Files
csidl_programfilescommonx86 C:\Program Files\Common Files

csidl_controls
csidl_printers
csidl_bitbucket
csidl_drives
csidl_network
csidl_connections

csidl_windows C:\Windows
csidl_system C:\Windows\System32
csidl_programfiles C:\Program Files
csidl_systemx86 C:\Windows\System32
csidl_programfilescommon C:\Program Files\Common Files
csidl_fonts C:\Windows\Fonts

csidl_commonappdata C:\ProgramData
csidl_commonstartmenu C:\ProgramData\Microsoft\Windows\Start Menu
csidl_commonprograms C:\ProgramData\Microsoft\Windows\Start Menu\Programs
csidl_commonstartup C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
csidl_commondesktopdirectory C:\Users\Public\Desktop
csidl_commontemplates C:\ProgramData\Microsoft\Windows\Templates
csidl_commonadmintools C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Administrative Tools
csidl_commondocuments C:\Users\Public\Documents

Windows XP

csidl_profile                 C:\Documents and Settings\<user>
csidl_desktop C:\Documents and Settings\<user>\Desktop
csidl_programs C:\Documents and Settings\<user>\Start Menu\Programs
csidl_personal C:\Documents and Settings\<user>\My Documents
csidl_favorites C:\Documents and Settings\<user>\Favorites
csidl_startup C:\Documents and Settings\<user>\Start Menu\Programs\Startup
csidl_recent C:\Documents and Settings\<user>\Recent
csidl_sendto C:\Documents and Settings\<user>\SendTo
csidl_startmenu C:\Documents and Settings\<user>\Start Menu
csidl_desktopdirectory C:\Documents and Settings\<user>\Desktop
csidl_nethood C:\Documents and Settings\<user>\NetHood
csidl_templates C:\Documents and Settings\<user>\Templates
csidl_appdata C:\Documents and Settings\<user>\Application Data
csidl_printhood C:\Documents and Settings\<user>\PrintHood
csidl_localappdata C:\Documents and Settings\<user>\Local Settings\Application Data
csidl_internetcache C:\Documents and Settings\<user>\Local Settings\Temporary Internet Files
csidl_cookies C:\Documents and Settings\<user>\Cookies
csidl_history C:\Documents and Settings\<user>\Local Settings\History
csidl_mypictures C:\Documents and Settings\<user>\My Documents\My Pictures
csidl_admintools C:\Documents and Settings\<user>\Start Menu\Programs\Administrative Tools

csidl_altstartup
csidl_commonaltstartup
csidl_programfilesx86
csidl_programfilescommonx86

csidl_controls
csidl_printers
csidl_bitbucket
csidl_drives
csidl_network
csidl_connections

csidl_windows C:\WINDOWS
csidl_system C:\WINDOWS\system32
csidl_programfiles C:\Program Files
csidl_systemx86 C:\WINDOWS\system32
csidl_programfilescommon C:\Program Files\Common Files
csidl_fonts C:\WINDOWS\Fonts

csidl_commonappdata C:\Documents and Settings\All Users\Application Data
csidl_commonstartmenu C:\Documents and Settings\All Users\Start Menu
csidl_commonprograms C:\Documents and Settings\All Users\Start Menu\Programs
csidl_commonstartup C:\Documents and Settings\All Users\Start Menu\Programs\Startup
csidl_commondesktopdirectory C:\Documents and Settings\All Users\Desktop
csidl_commonfavorites C:\Documents and Settings\All Users\Favorites
csidl_commontemplates C:\Documents and Settings\All Users\Templates
csidl_commonadmintools C:\Documents and Settings\All Users\Start Menu\Programs\Administrative Tools
csidl_commondocuments

Power Shell Examples

 PSH [C:\foo]: . 'E:\PowerShellScriptLib\System.Environment\Get-SpecialFolders.PS1'
Folder Name Path
----------- -----------------------------------------------
Desktop C:\Users\<user>\Desktop
Programs C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Personal C:\Users\<user>\Documents
Personal C:\Users\<user>\Documents
Favorites C:\Users\<user>\NetHood\Favorites
Startup C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
Recent C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Recent
SendTo C:\Users\<user>\AppData\Roaming\Microsoft\Windows\SendTo
StartMenu C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Start Menu
MyMusic C:\Users\<user>\Music
DesktopDirectory C:\Users\<user>\Desktop
MyComputer
Templates C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Templates
ApplicationData C:\Users\<user>\AppData\Roaming
LocalApplicationData C:\Users\<user>\AppData\Local
InternetCache C:\Users\<user>\AppData\Local\Microsoft\Windows\Temporary Internet Files
Cookies C:\Users\<user>\AppData\Roaming\Microsoft\Windows\Cookies
History C:\Users\<user>\AppData\Local\Microsoft\Windows\History
CommonApplicationData C:\ProgramData
System C:\Windows\system32
ProgramFiles C:\Program Files (x86)
MyPictures C:\Users\<user>\Pictures
CommonProgramFiles C:\Program Files (x86)\Common Files

Vista Help locations

Vista AP Help (Vista Help)

C:\ProgramData\Microsoft\Assistance\Client\1.0\en-US

This looks like an All User location for AP core Vista Help

MS Help 2 (VS/MSDN Help)

C:\Users\<user>\AppData\Local\Microsoft Help

User level H2 Help - Contains H2Reg registration info (User logon)

C:\ProgramData\Microsoft Help

All User level H2 Help - Contains VS 2005; MSN; Office 2007 help

XP Help locations

MS Help 2 (VS/MSDN Help)

C:\Documents and Settings\<user>\Application Data\Microsoft Help

User level H2 Help - Contains H2Reg registration info (User logon)

C:\Documents and Settings\All Users\Application Data\Microsoft Help\ , or
C:\Documents and Settings\All Users.WINDOWS\Application Data\Microsoft Help\

All User level H2 Help - Contains VS 2005; MSN; Office 2007 help


Vista Virtualization

Virtualization ­is the process of diverting writes to sensitive system areas to user-specific locations. 
eg. if I write XYZ.INI to c:\Windows\System32\ you will see the file appear in the following
location ­ C:\Users\<user>\AppData\Local\VirtualStore\Windows\System32\

Same happens with c:\Program Files\
Registry HKEY_LOCAL_MACHINE->SOFTWARE is also virtualized to
HKEY_CLASSES_ROOT->VirtualStore->SOFTWARE

Microsoft intends to remove virtualization from future versions of the Windows operating
system as more applications are migrated to Windows Vista.
Notice that the VirualStore areas are "Current User" and not "All User".
Also you can be in situation where you are reading from one location but writing to another (virtual) location.
So... developers should not rely on Virtualization. Its there only to help old applications work.

Note:

Probably when developing SW you should switch off Virtualization. When you do this, a write
to a protected area will result in a "Protection Violation". Which will draw your attention to the problem.

To switch Virtualization effectively Off, use a manifest file to set the execution level. Set it to "asInvoker".

<requestedExecutionLevel
level="asInvoker | highestAvailable | requireAdministrator"
uiAccess="true|false"/>

asInvoker - The application runs with the same token as the parent process.
Full details here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnlong/html/AccProtVista.asp


More Notes

Vista RTM released and available on MSDN 17-Nov-2007  (Build 6000.16386 - x86 version - ISO DVD Image - 2.49GB)

Vista No Key Install

Vista can be installed without a Key!  You get 30 days free use.

You will have an opportunity to enter a key later (if you want) when prompted by Windows Activation.

If you plan to get say Windows "Business" later,then install Windows "Business" not "Utimate". ie. An "Ultimate" key wont work on "Business" and visa-versa.
How to Install without a Key
a) In Setup when prompted for the Install Key, leave the field empty and click Next and No.

b) On the next page select your Installation type you want.

1 Business
2 Homebasic
3 Homepremium
4 Ultimate
5 HomebasicN
6 BusinessN
7 Starter

Note#1: BusinessN and HomebasicN are installs "without" Media Player.
This is mainly for Europe where WMP was deemed anti competitive.

Note#2: Install the "Business" version -- Only Business and Ultimate have
Remote Desktop. Some customers may go for Utimate but its unlikely given extra cost.
http://www.microsoft.com/windowsvista/getready/editions/default.mspx

Comments