Q. When you double-click a folder in Windows XP SP2 (Service Pack 2) the folder does not open and displays the Search Results window?

When you double-click a folder in Windows XP explorer, it is supposed to expand (open) the folder. Your Windows XP SP2 (Service Pack 2) computer displays the Search Results window instead.

NOTE: When you right-click the folder and press Open, the folder expands successfully.

This behavior will occur if a registry entry in HKEY_CLASSES_ROOT\Directory\shell is corrupted.

I have scripted DirShell.bat and DirShell.reg to resolve this issue.

The syntax for using DirShell.bat is:

DirShell FolderName

Where FolderName is the fully qualified folder name where a backup of the existing HKEY_CLASSES_ROOT\Directory\shell registry entries will be created, as DirShellOld.reg.

NOTE: After running DirShell.bat, you MUST shutdown and restart Windows XP.

NOTE: DirShell.bat and DirShell.reg must be placed in the same folder.

DirShell.REG contains:

REGEDIT4

\[-HKEY_CLASSES_ROOT\Directory\shell\]

\[HKEY_CLASSES_ROOT\Directory\shell\]
@="none"

\[HKEY_CLASSES_ROOT\Directory\shell\cmd\]
@="Open Command Window Here"

\[HKEY_CLASSES_ROOT\Directory\shell\cmd\command\]
@="cmd.exe /k \"cd %L\""

\[HKEY_CLASSES_ROOT\Directory\shell\find\]
"SuppressionPolicy"=dword:00000080

\[HKEY_CLASSES_ROOT\Directory\shell\find\command\]
@=hex(2):25,53,79,73,74,65,6d,52,6f,6f,74,25,5c,45,78,70,6c,6f,72,65,72,2e,65,  78,65,00

\[HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\]
"NoActivateHandler"=""
@="\[FindFolder(\"%l\", %I)\]"

\[HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\application\]
@="Folders"

\[HKEY_CLASSES_ROOT\Directory\shell\find\ddeexec\topic\]
@="AppProperties"

DirShell.bat contains:
@echo off
if \{%1\}==\{\} @echo Syntax: DirShell Folder&goto :EOF
if not exist %1 @echo Syntax: DirShell - %1 does NOT exist.&goto :EOF
if not exist "%~DP0DirShell.REG" @echo "%~DP0DirShell.REG" does NOT exist.&goto :EOF
setlocal
set folder=%1#
set folder=%folder:"=%
set folder=%folder:\#=%
set folder=%folder:#=%
if exist "%folder%\DirShellOld.reg" del /q "%folder%\DirShellOld.reg"
regedit /a "%folder%\DirShellOld.reg" "HKEY_CLASSES_ROOT\Directory\shell"
regedit /s "%~DP0DirShell.REG"


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish