Monday, January 9, 2012

Windows 7: Cannot Create New Folder in Windows Explorer

I was working along in Windows 7 x64, when suddenly I discovered that I could not create a folder in Windows Explorer.  The method I usually used (File > New > Folder) no longer existed:  the Folder option was gone from the drop-down menu.

A search suggested that I was not the only one who had experienced this.  It seemed that suggested solutions had not reliably fixed the problem.  One such solution was to download and run a REG file, and then reboot, to correct a problem in the registry.  I was concerned that such files could make a large number of registry changes, though, with unpredictable consequences, and that not all of those changes might be applicable to all versions of Windows 7.  A more conservative option was to add just one line to the registry, in a sub-subkey that might or might not already be present.  Specifically, the Default value of HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New was supposed to be {D969A300-E7FF-11d0-A93B-00A0C90F2719}.  But mine already was.  So the conservative registry edit wasn't the answer.

Someone had said something about creating a new folder by using the right-click context menu in Windows Explorer.  I had rarely if ever used that approach; and now that I tried it, I saw that the only New thing I could create there was a Briefcase, that holdover from ye olde versions of Windows.  I had often used Ctrl+Shft+N to create new folders, but that wasn't working either.  I ran a search to see if there were other ways to create a new folder, at least to buy some time until maybe a solution would occur to me.  One suggestion was to click on the new folder icon on the taskbar.  I didn't have that, I hadn't seen it, and pinning Windows Explorer to the taskbar didn't create it.  I suspected that perhaps the writer meant "command bar" (i.e., near the top of the Windows Explorer window), not the taskbar.  I did still have a New Folder option up there, but it wasn't working.  It seemed that the basic functionality was gone, regardless of where it might have been available previously.

It took me a while to realize that, of course, I could still create folders by opening a command window and using the "md" command.  Example:  md "\Folder name" -- where quotation marks were necessary because the folder's name had a space in it.  The hard way to open a command window in the folder where I wanted to create a subfolder was to go to Start > Run > cmd, and then navigate to the correct place by using commands like C: or D: to change drives, and cd "\Folder name\Subfolder name" to get where I wanted to go.  The easy way to open a command window in any folder was to go into Ultimate Windows Tweaker > Additional Tweaks > Show "Open Command Window Here."

But back to the missing ways of creating a new folder within Windows Explorer.  There were the inevitable suggestions to search for malware; but I wasn't getting any other weirdness, so malware seemed unlikely.  One discussion brought to mind the possibility that a recent program installation was responsible.  I played around with uninstalling and rebooting, but nothing clear emerged.  It seemed that I would have to restore Windows from a previous version, install upgrades and new programs as needed or desired, and see if I could track more closely when (or if) the problem reappeared.  But before doing that, I went ahead and ran the REG file mentioned above, the one that made many registry changes.  But when I did, I got an error:

Registry Editor

Cannot import D:\Current\NewFolderFix.reg:  Not all data was successfully written to the registry.  Some keys are open by the system or other processes.
I closed all windows that were still open, right-clicked on various icons down in the system tray and closed those, and tried again.  Still no luck.  I went to Start > Run > taskmgr.exe > Processes tab, closed down some processes that looked safe, and tried again.  It still wasn't enough.  I rebooted into Safe Mode and tried running the REG file there.  Same error!  I ran a search for the error message, but found no solution in the several pages I examined.  One hypothesis:  the REG file was not suited for this particular machine and/or version of Windows.

Eventually I did figure out what caused the no-new-folders problem.  It was a program called Boot Deleter.  It had a nifty option to associate itself with Windows Explorer, so that I could just right-click on a file that resisted being deleted by other means, and indicate that I wanted that file to be deleted the next time the system rebooted.  But now that I was watching carefully, the ability to create a new folder disappeared as soon as I clicked on the Associate button.  No real surprise that it would be problematic:  the program had not been updated since 2005.  I clicked, now, on the button to kill the association, but that didn't solve the problem:  the ability to create a new folder was not restored, even after a reboot.

Due to an apparent malfunction or misconfiguration, I discovered at this point that System Restore was not keeping current backups.  So now I would apparently have to restore a drive image from more than a month earlier.  Not a terrible thing, but I wondered if there was another way.  I hadn't used Revo Uninstaller, to watch what was being done when Boot Deleter was installed.  Boot Deleter hadn't installed a desktop icon or otherwise been visible, so I couldn't use Revo's Hunter Mode to figure out the problem.  But I could try reinstalling Boot Deleter, with Revo running, and see if it would work now.  I saw, then, that I would need the pro version of Revo for this, and I wasn't ready to spring for that.

Another possibility was to use Process Monitor (PM), which was said to track attempts to modify the registry.  I opened PM, maximized it, spread out its columns so that I could see what was happening, and went up to its toolbar.  I hovered over items to get their tooltips.  At the right end of the toolbar, I turned off a couple of items, so that I was monitoring only file and registry activity.  I went to Boot Deleter and got ready to install it again.  Back at the PM toolbar, I clicked on the Clear button, so that I wouldn't have too long a history to work through.  (I could also have used Ctrl-X to clear.)  Then I went back to Boot Deleter and installed it.  Then, back at PM, I clicked on the Capture button (Ctrl-E).  Then the Filter button (Ctrl-L).  In the Process Monitor Filter dialog, I deselected all of the items listed (e.g., "Process Name is Procmon.exe ... Exclude.").  In the first drop-down box at the top, I selected Process Name.  The second box said "is."  In the third drop-down box, I selected BootDeleter.exe.  The fourth box said "Include."  I clicked Add.  This put my BootDeleter.exe item in the list as the only checked item.  I clicked Apply > OK.  The status bar at the bottom of the PM screen told me that I now had a list of 2,345 events.  I went to File > Save.  "Events displayed using current filter" was already selected.  I changed the format to CSV and specified an output path and CSV filetype > OK.  In Windows Explorer, I double-clicked on that resulting file ("Process Monitor 01.csv"), and manipulated the file in Excel.  Basically, I filtered it for the items that looked like file or registry changes that would need to be reversed.  I wound up with a list of several hundred items.  Clearly, this was not going to be a matter of a few registry keys needing to be undone.  I decided it would be easier to restore the previous image, and catch up to the present that way.