Change explorer's hide/show mode

  • Thread starter Lester Horwinkle
  • Start date
L

Lester Horwinkle

Explorer can be set to show hidden files, or to hide hidden files, by using
the "Tools > Folder Options" menu, "View" tab, "Hide files and folders"
section. Click on either the "Do not show hidden files and folders" checkbox
or the "Show hidden files and folders" checkbox, then click OK.

Is there a fully programmatic way to do this?

In the registry at
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced, there's a
value called "Hidden". This can be set to 1 or 2, depending on whether you
want to show hidden files or hide hidden files. (Indeed, this is the
registry value that is changed by the manual "Tools > Folder Options"
method, above.)

In Windows 98, you could change this registry value directly from a program,
and any subsequently opened Explorer window would see the change and act
accordingly.

But in Windows XP, you can change this registry value all you want, and
Explorer just ignores it ... unless you then go into the "Tools > Folder
Options / View" settings (as above), and then click OK. You can see that the
correct checkbox is already checked off ... matching the change that you
made to the registry. But it doesn't take effect until you click OK in this
dialog.

This does not meet my needs. I need a fully programmatic method, requiring
no manual intervention. Does anyone know how?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top