Why is the readonly property for folders so strange?

Date:September 30, 2003 / year-entry #77
Tags:history
Orig Link:https://blogs.msdn.microsoft.com/oldnewthing/20030930-00/?p=42353
Comments:    10
Summary: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 Readonly 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...

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 Readonly 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 shold use the function PathMakeSystemFolder to mark a folder as requiring special attention from Explorer.


Comments (10)
  1. RJ says:

    I love this site … so many interesting updates. I’m learning lots from all of this, please keep it up :)

  2. Lee Alexander says:

    Carry on with the good work I thoroughly enjoy reading your articles just before I start work :-) BTW are you doing any PDC talks?

  3. Serge Wautier says:

    Speaking of slow networks, I’ve recently setup a VPN between our headquarters and a foreign subsidiary. My experience is that using Windows Explorer to connect to a shared drive over the VPN is practically impossible : waaaaaaaay too slow, especially when one (single-)clicks a file. I assumed it’s because Windows collects data about the file (e.g.: title and author displayed in the status bar if it’s a word doc).
    On the other hand, connecting through a console window (net use blah…) works very well (in terms of performance, not in terms of usability…)
    Is there any ‘Use slow connection’ mode for access to network drives by Windows Explorer, a bit like the same option in RAS ?

    And of course, it must be written because it’s just too easy to think it and never say it : Thanks so much for this blog, Raymond ! Keep up with the good work.

  4. Israel says:

    That was one of the most perplexing behaviors I had encountered in Windows! Thanks for explaining. I know I’ll feel like a hotshot next time I’m explaining it to someone.

  5. John Topley says:

    This seems very strange to me. Why can’t it do what it says on the tin i.e. if read-only is checked then any existing files within that folder should be made read-only, as should future files added to it.

  6. Gleb Dolgich says:

    Can you give any insight on why icon handlers are ignored for folders?

  7. Mark Hurd says:

    Serge: Given what I’ve seen as a developer, a left click seems to build the whole contect menu you’d expect to see with a right click, then choose the default menu item. If you have things like WinZip and such that need to review the content of the file to determine what menu items to offer this can be rather slow.

  8. KJK::Hyperion says:

    Mark: that’s exactly how it works. The shell builds an off-screen context menu and "clicks" the default item. Shell extensions are supposed to make their additions to the context menu quickly, of course. Read about IShellFolder::GetUIObjectOf, IContextMenu::QueryContextMenu and IContextMenu::InvokeCommand

  9. Raymond Chen says:

    Commenting on this entry has been closed.

  10. There is an alias at Microsoft that is the front line for the Shell team, the one place where the important…

Comments are closed.


*DISCLAIMER: I DO NOT OWN THIS CONTENT. If you are the owner and would like it removed, please contact me. The content herein is an archived reproduction of entries from Raymond Chen's "Old New Thing" Blog (most recent link is here). It may have slight formatting modifications for consistency and to improve readability.

WHY DID I DUPLICATE THIS CONTENT HERE? Let me first say this site has never had anything to sell and has never shown ads of any kind. I have nothing monetarily to gain by duplicating content here. Because I had made my own local copy of this content throughout the years, for ease of using tools like grep, I decided to put it online after I discovered some of the original content previously and publicly available, had disappeared approximately early to mid 2019. At the same time, I present the content in an easily accessible theme-agnostic way.

The information provided by Raymond's blog is, for all practical purposes, more authoritative on Windows Development than Microsoft's own MSDN documentation and should be considered supplemental reading to that documentation. The wealth of missing details provided by this blog that Microsoft could not or did not document about Windows over the years is vital enough, many would agree an online "backup" of these details is a necessary endeavor. Specifics include:

<-- Back to Old New Thing Archive Index