Welcome to MSDN Blogs Sign in | Join | Help

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 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.

Published Tuesday, September 30, 2003 11:55 AM by oldnewthing
Filed under:

Comments

# RE: Why is the readonly property for folders so strange?

Tuesday, September 30, 2003 12:07 PM by RJ
I love this site ... so many interesting updates. I'm learning lots from all of this, please keep it up :)

# RE: Why is the readonly property for folders so strange?

Wednesday, October 01, 2003 4:09 AM by Lee Alexander
Carry on with the good work I thoroughly enjoy reading your articles just before I start work :-) BTW are you doing any PDC talks?

# RE: Why is the readonly property for folders so strange?

Wednesday, October 01, 2003 11:33 AM by Serge Wautier
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.

# RE: Why is the readonly property for folders so strange?

Wednesday, October 01, 2003 2:49 PM by Israel
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.

# RE: Why is the readonly property for folders so strange?

Monday, October 06, 2003 11:10 AM by John Topley
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.

# RE: Why is the readonly property for folders so strange?

Thursday, October 09, 2003 8:04 AM by Gleb Dolgich
Can you give any insight on why icon handlers are ignored for folders?

# RE: Why is the readonly property for folders so strange?

Sunday, October 19, 2003 11:06 PM by Mark Hurd
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.

# re: Why is the readonly property for folders so strange?

Tuesday, June 22, 2004 6:16 PM by KJK::Hyperion
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

# re: Why is the readonly property for folders so strange?

Tuesday, June 22, 2004 8:57 PM by Raymond Chen
Commenting on this entry has been closed.

# It's not my imagination; that function is ignoring me!

Thursday, August 24, 2006 2:28 PM by Sorting It All Out

There is an alias at Microsoft that is the front line for the Shell team, the one place where the important...
New Comments to this post are disabled
 
Page view tracker