September 30th, 2003

Why is the readonly property for folders so strange?

It’s actually a signal to Explorer to look harder. It doesn’t mean that the directory is read-only.

If a folder has the Read-Only or System flag set, then Explorer will look for a desktop.ini file which describes the folder customizations. For performance reasons, Explorer does this only if the directory has the +R or +S flag. (This is enormously important on slow networks.)

There are two KB articles on this subject, and I will defer to them for much of the discussion. This is the version that applies to Windows XP and Windows Server 2003. There is also a version that applies to older versions of Windows, although the UseSystemForSystemFolders policy still applies.

Coders should use the function PathMakeSystemFolder to mark a folder as requiring special attention from Explorer.

Topics
History

Author

Raymond has been involved in the evolution of Windows for more than 30 years. In 2003, he began a Web site known as The Old New Thing which has grown in popularity far beyond his wildest imagination, a development which still gives him the heebie-jeebies. The Web site spawned a book, coincidentally also titled The Old New Thing (Addison Wesley 2007). He occasionally appears on the Windows Dev Docs Twitter account to tell stories which convey no useful information.

0 comments

Discussion are closed.