views:

35

answers:

1

I'm trying to detect the show system and hidden files settings from Windows Explorer in an application I'm writing. I'm using SHGetSetSettings and in calling it I have to specify one or more of the SSF Constants to specify what settings to retrieve.

Finding out the hidden files settings was easy enough, I just had to specify SSF_SHOWALLOBJECTS to retrieve that setting. As for the system files setting, I'm a bit confused between SSF_SHOWSYSFILES and SSF_SHOWSUPERHIDDEN. It appears that "Hide protected operating system files" in Explorer's "Folder Options" maps to SSF_SHOWSUPERHIDDEN, but I can't find any setting that appears to map to SSF_SHOWSYSFILES.

Does anyone know what SSF_SHOWSYSFILES is used for or why it's there? Is it just a legacy setting that is no longer used in Windows?

+3  A: 

It's documented in this MSDN page:

(SSF_SHOWALLOBJECTS)
The state of the Show hidden files and folders option.

(SSF_SHOWSYSFILES)
The state of the Do not show hidden files and folders option.

(SSF_SHOWSUPERHIDDEN)
The state of the Hide protected operating system files option.

Hans Passant
Thanks for your response. Do you mean that `SSF_SHOWSYSFILES` is the new setting and the `SSF_SHOWSUPERHIDDEN` is the legacy setting? I'm using Windows 7 and whenever I check/uncheck "Hide protected operating system files", it changes `SSF_SHOWSUPERHIDDEN`, but I can't find anything that changes `SSF_SHOWSYSFILES`, it always comes back `false`.
Zach Johnson
You're right, answer updated with doc link.
Hans Passant
Thanks! The MSDN link (although for `IShellDispatch4`) explains it very well, and experimentation confirms that is correct for `SHGetSetSettings` as well. It looks like `SSF_SHOWSYSFILES` is essentially the opposite of `SSF_SHOWALLOBJECTS`, so I don't need to worry about checking `SSF_SHOWSYSFILES`.
Zach Johnson