Files which are stored in Channel Directories are invisible via Windows Explorer but are visible via DOS dir.
This magic is accomplished via desktop.ini files. In this case, desktop.ini is normally the only file in the directory and it specifies an icon which replaces the typical folder icon.
This is absolutely unbelievable. I discovered it while trying to fix a boot problem.
Using Windows Explorer, when you rename most files by making the name longer than 8.3, Explorer changes the DOS 8.3 file name to something containing a tilde (~). (I use this technique all the time to hide files from the system.)
However, when a file already has a 3 character extension, it does not matter how many characters you add to the extention, the DOS 8.3 name does not change!
My standard debug procedure is to rename Autoexec.bat, modify it, and save the modifications back as Autoexec.bat. (This allows me to preserve the original file date.) Imagine my suprise when notepad asked me if I wanted to overwrite the existing file.
Re-naming Autoexec.bat to autoexec.bat1 does not change the DOS name. However, autoexec.bat.1 becomes autoex~1.1.
It also won't find certain (but not all) files named desktop.ini.
Start / Programs / StartUp
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders "Startup"="C:\\WINDOWS\\Start Menu\\Programs\\Startup" HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders "Startup"="C:\\WINDOWS\\Start Menu\\Programs\\Startup"
As a normal part of debugging startup problems, you disable all unnecessary programs. Right? So, when I had a recent problem, I simply re-named the startup directory.
Well that didn't work. It turns out that Windows Explorer knows that you didn't actually want to disable the directory. So it updated both registry pointers to point to the new directory. (What a great OS!! :)
Of course, I assume that the other entries in these keys will behave in the same way. I have verified it for
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Explorer\User Shell Folderswhen you use Windows Explorer to modify the default value. Interestingly, they are deleted when you return to the original name.
I guess that this explains why it takes so long to simply rename a directory. The OS is searching the entire registry for possible matches.
Since most applications automatically add themselves to your Programs and/or StartUp menus, it makes sense to store pointers as global variables (i.e. in the registry) so that generic install programs will work as expected.