Slow context menu in explorer

P

Peter Wall

Platform is XP Professional Version 5.1 (Build 2600.xpsp1.020828-1920 :
Service Pack 1)
Memory available to Windows 522,472 KB

When right clicking on files in the explorer it takes a long time for the
context menu to appear 30+ seconds. If I disable the Local Area Connection
the menu is displayed in less than one second.

I don't have any network targets on my path.

I don't think that this is the same as the reported issue with Explorer
taking 100% CPU as the processor usage for the process remains low during
this time <5% according to Performance Monitor. I tried some of the
solutions to that problem anyway and they had no effect.

Anybody hit this? Found a solution?

Cheers, Peter.
 
P

Peter Wall

Files only but all types that I've tried *.doc, *.xls, *.zip, *.txt, *.htm,
*.pdf, *.cpp, *.h etc.
 
D

David Candy

Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've clicked on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.
 
D

David Candy

PS there are 24 different places that a context menu extension can be
applied to a particular file - all inheriting and overriding each other.
 
P

Peter Wall

Thanks. I'll have a look at this. There are several entries under
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers some of which I recognise
immediately, others will need some digging.

Any thoughts as to why this might be affected by the enablement/disablment
of the LAN connection? Unless it's a shell extension that accesses the
network if it's available?

BTW where did you find this information? Any book recommendation?

Thanks again, Peter.

--

Peter Wall


David Candy said:
Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've clicked on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.

Peter Wall said:
Files only but all types that I've tried *.doc, *.xls, *.zip, *.txt, *.htm,
*.pdf, *.cpp, *.h etc.
2600.xpsp1.020828-1920
: for
the
 
P

Peter Wall

David,
You're a star. Rather worryingly it was the "Open with" entry which
turned out to resolve to %SystemRoot%\system32\SHELL32.dll! I've removed
this entry and will investigate the "bogus" shell32.dll at my leisure.

Many thanks again, Peter.

--

Peter Wall


David Candy said:
Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've clicked on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.

Peter Wall said:
Files only but all types that I've tried *.doc, *.xls, *.zip, *.txt, *.htm,
*.pdf, *.cpp, *.h etc.
2600.xpsp1.020828-1920
: for
the
 
D

David Candy

Nothing easy. The docs are scattered around the universe, one para here, one
paragraph there.

The official docs, in part, is here. This is very misleading.

http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersgu
ide/shell_basics/shell_basics_extending/fileassociations/fileassoc.asp?frame
=true

Each of these can be Per User (usually there are no per user settings) or
per machine. Per user overrides per machine. I'll only list per machine,
just x 2.

File Extension HKCR\.txt
ProgID HKCR\textfile
Classid (most extensions don't have one, but Doc, jpeg etc do)
SystemFileAssociations - extensions
HKEY_CLASSES_ROOT\SystemFileAssociations\.txt
SystemFileAssociations - percieved type
HKEY_CLASSES_ROOT\SystemFileAssociations\text
* (All Files) HKEY_CLASSES_ROOT\*
AllFileSystemObjects HKEY_CLASSES_ROOT\AllFilesystemObjects

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExt
s\.txt (this is Open With and overrides file associations for the default
verb only)

(Umm - That only 16 ther must be more)

So Extensions point to the Progid and the Percieved type, The ProgID points
to the ClSID (if one)

HKCR (HKEY_CLASSES_ROOT) is a merged view of Current User and Local Machine.
As there is usually no CU settings therefore HKCR is HKLM\Software\Classes
which is where the data is stored. Per user associations, if any, are at
HKCU\Software\Classes

The order of execution is Drop Target (only valid on XP or later), DDE
Verbs, Non DDE Verbs, Contect Menus can also affect the verb chosen.

Windows works out what a file is from in this order
The extension
For OLE Compound Files (Word Docs) by the CLSID embedded in the file (why
word docs don't need extensions)
And finally by pattern matching the contents of the file. (EG exe, scr, ocx,
cpl and dll files all start with MZ - the initial of the MS programmer that
designed the Dos exe file format - all windows programs have a dos program
built in, that these days, says "this Program Requires MS Windows if run on
a Dos computer") HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
\FileType

[Note the Com order of finding things is the exact opposite of Explorer's]

You won't find that mentioned in the docs. It's in the Com SDK but appears
to have been removed from the current library (just installed Oct 2001 to
get this key). I've pasted the info below.

Ignore anything in the docs about Private Vs Public. Xp won't have a clue
what you're talking about as this only exists in someones imagination. The
docs leave many (most) small important details out.

You need to read the whole section as it scattered through all the topics.

As to How to use it you need to read The Windows User Experience (it's in
the library). This says what one should do rather than what one can do..
http://msdn.microsoft.com/library/en-us/dnwue/html/welcome.asp?frame=true

(Non-Compound) FileType Key
Used by GetClassFile to match patterns against various file bytes in a
non-compound file.

Registry Entry
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\
\FileType
\<CLSID>
\<n> = <offset, cb, mask, value>

Value Entries
offset
This value determines how far from the beginning or end of the file to
begin the comparison. If the offset is a negative value then the comparison
will begin from the end of the file minus the offset value. The offset value
is a decimal type unless preceded by "0x".
cb
Represents the length in bytes from the beginning to the end of the file.
Represents the byte range in the file. The cb value is a decimal unless
preceded by "0x".
mask
A binary value used for masking, which is performed by using a logical AND
operation, and the byte range specified by offset and cb. If this value is
omitted then the bytes will be set to all ones. This value is always
hexadecimal.
value
Represents the pattern that must match for a file to be of this FileType.
The pattern is used to properly identify a known file format from its
contents not by its extension.
Remarks
Entries under the FileType key are used by the GetClassFile function to
match patterns against various file bytes in a non-compound file. FileType
has CLSID sub keys, each of which has a series of sub keys \0, \1, \2..
These values contain a pattern that, if matched, yield the indicated CLSID.
Following are examples of FileType entries.
\0 = 0, 4, FFFFFFFF, ABCD1234
where the first 4 bytes must be ABCD1234, in that order, or
\1 = 0, 4, FFFFFFFF, 9876543
where they must match 9876543, or
\2 = -4, 4, FEFEFEFE
where the last four bytes in the file must be FEFEFEFE


Peter Wall said:
Thanks. I'll have a look at this. There are several entries under
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers some of which I recognise
immediately, others will need some digging.

Any thoughts as to why this might be affected by the enablement/disablment
of the LAN connection? Unless it's a shell extension that accesses the
network if it's available?

BTW where did you find this information? Any book recommendation?

Thanks again, Peter.

--

Peter Wall


David Candy said:
Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've
clicked
on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.

2600.xpsp1.020828-1920
 
D

David Candy

Why do you think it's bogus. Might be corrupt. Type sfc /scannow with XP CD
in drive.

Open with only has 2 million keys to look at. What a poor choice.

Get regmon from www.sysinternals.com. (get filemon while you're at it)

Using Regmon to see what key Open With is trying to read when it crashes. On
the Edit menu put a filter in of HKCR which will reduce useless entries
substantially.

This is a general fix for shell32. Worth a try and doesn't hurt.

Regsvr32 /i shell32
and also
regsvr32 shdocvw

Peter Wall said:
David,
You're a star. Rather worryingly it was the "Open with" entry which
turned out to resolve to %SystemRoot%\system32\SHELL32.dll! I've removed
this entry and will investigate the "bogus" shell32.dll at my leisure.

Many thanks again, Peter.

--

Peter Wall


David Candy said:
Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've
clicked
on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.

2600.xpsp1.020828-1920
 
D

David Candy

Any programs run from network, or installed from network via Group Policy
(like Office). Explorer also hangs with ftp sites untill the site answers.
So shortcuts to ftp sites can be deadly.
Peter Wall said:
David,
You're a star. Rather worryingly it was the "Open with" entry which
turned out to resolve to %SystemRoot%\system32\SHELL32.dll! I've removed
this entry and will investigate the "bogus" shell32.dll at my leisure.

Many thanks again, Peter.

--

Peter Wall


David Candy said:
Hypothsis is an addin is erroring

Type regedit in Start Run

Navigate to
HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers (* is all files)
What is under here

If there is not a human readable description look the number up here
HKEY_CLASSES_ROOT\CLSID\<the number>\inprocserver32 [it will be a server
something inprocserver32 is most common]
and look at the file name of the server then View it's version info (by
right clicking it in explorer and choosing Properties).

There is on a standard XP only ContextMenuExtensions and
PropertySheetExtensions with 4 actual extensions of each type. Do you have
more than 4 or do you have other types of extensions listed (newer ones
don't get names just long numbers).

Property Sheets shouldn't cause this. But context menu extensions are run
one by one when you right click a file, they get told what you've
clicked
on
and can choose to add commands to the menu, then the menu gets shown.

* Applies to all files, AllFileSystemObjects applies to all Files and File
Folders. It's possibe that it may be under AllFileSystemObjects but when
it's passed a folder it doesn't crash.

One would expect you Antivirus program to add one. In fact anything under
the first line (as a general rather than absolute rule - in XP the line
sometimes moves down a couple of places) in a context menu is an extension.
Above the line is a verb.

2600.xpsp1.020828-1920
 

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