 |
|
 |
Anyone knows how to bypass the 'contextmenu-item who goes missing'? It works when operating on files/folders on my desktop (even when more than 15 files/folders selected. It also works when <15 files/folders are selected on the same level (all rootfolders or subfolders in a folder)but it disappears when selecting more that 16 files/folders on the same level
|
|
|
|
 |
|
 |
Which context menu item is going missing?
|
|
|
|
 |
|
 |
Today i have found 18 keys in the registry where an openfolder key contains the panda cloud antivirus CLSID value.
Panda creates the openfolder keys if they are not present.
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Classes\*\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Classes\Folder\ShellEx\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Classes\PsShell.ShellExt.1\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_LOCAL_MACHINE
Key: SOFTWARE\Classes\PsShell.ShellExt\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\*\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\Directory\Background\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\Folder\ShellEx\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\PsShell.ShellExt.1\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\PsShell.ShellExt\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached
Value: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD} {000214E4-0000-0000-C000-000000000046} 0xFFFF
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\*\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\Directory\Background\shellex\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\Folder\ShellEx\ContextMenuHandlers\OpenFolder
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\PsShell.ShellExt.1\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
Hive: HKEY_USERS
Key: S-1-5-21-419573180-2974977370-615064610-1002_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\Classes\PsShell.ShellExt\CLSID
Value:
Data: {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}
|
|
|
|
 |
|
 |
Some of the registry settings are overwriting panda cloud antivirus and vice versa.
I guess it's a bug in panda cloud antivirus and not in openfolder but they blame windows 7.
If it's the operating system, it can be fixed no?
Thanks
|
|
|
|
 |
|
 |
Hi pluimpje1,
Which registry settings are being overwritten?
|
|
|
|
 |
|
 |
The CLSID key of panda cloud AV is {80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}, it overwrites every contextmenuhandlers
------------------------------------------------------
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shellex\ContextMenuHandlers\OpenFolder]
@="{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shellex\ContextMenuHandlers\OpenFolder]
@="{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\ShellEx\ContextMenuHandlers\OpenFolder]
@="{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PsShell.ShellExt.1\CLSID]
@="{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\PsShell.ShellExt\CLSID]
@="{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD}"
[HKEY_USERS\S-1-5-21-419573180-2974977370-615064610-1002\Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Cached]
"{80AEF606-7FFA-4EF6-86C4-0B86FEF4E0CD} {000214E4-0000-0000-C000-000000000046} 0xFFFF"=hex:01,\
00,00,00,00,00,00,00,ff,a9,f0,74,80,d0,cc,01"
--------------------------------------------
|
|
|
|
 |
|
 |
Since you are writting code for a contextmenu i'm wondering whether you know what to add to the registry to create an exta item in a LEFTcontextmenu.
Let me clarify:When you download, you can, in windows 7 click on it with your left mouse button to let a contextmenu appear wih the items 'open', 'always open this type of files', 'show folder' and 'delete'. I want to be able to scan my download without having to open it, or to go into the download folder.
Thanks
|
|
|
|
 |
|
 |
Some of the registry settings are overwriting panda cloud antivirus.
I guess it's a bug in panda cloud antivirus and not in openfolder but they blame windows 7.
If it's the operating system, it can be fixed no?
Thanks
|
|
|
|
 |
|
 |
Cool little toy, but as an article this thing needs a TON of work.
|
|
|
|
 |
|
 |
I completely agree with you, didn't have time to write it as a proper article to be honest, I'd had several CodeProject users request the source code and this was the quickest way of doing it.
Sorry it took me so long to reply, I only just noticed your comment
regards,
Jonathan
|
|
|
|
 |
|
|
 |
|
 |
Maybe I'm doing something wrong here.
I'm using Visual Studio 2010 on Windows 7 x64 and no context menu.
I added
inline bool IsWinSeven() const { return ((verInfo_.dwPlatformId == VER_PLATFORM_WIN32_NT) && (verInfo_.dwMajorVersion == 6) && (verInfo_.dwMinorVersion == 1)) ? true : false; };
Any Ideas?
Thx in advance
PS: When compiling my file is 437 KB and your x64 project file is 108kb how come.
Not important but i'm just curious.
|
|
|
|
 |
|
 |
It's the only shell extension example I can find that actually works on my box, everywhere it's supposed to!
|
|
|
|
 |
|
 |
Hi Jonathan,
I hope all is going well. Since you seem to be tolerant of suggestions, I wanted to mention another thing that might help. In IOpenFolder.h, there are several strings such as "OpenFolder" that are hard-coded in two places, once for ANSI and once for UNICODE. And then variables are defined for these strings; of course, there are also two sets of variables:
const char OPENFOLDERADMIN[] = "OpenFolderAdmin";
const wchar_t OPENFOLDERADMINU[] = L"OpenFolderAdmin";
const char OPENFOLDER[] = "OpenFolder";
const wchar_t OPENFOLDERU[] = L"OpenFolder";
and the same is done for menu-related strings:
std::string menuText_;
std::string menuTextAdmin_;
std::string menuDesc_;
std::string menuDescAdmin_;
std::wstring menuDescU_;
std::wstring menuDescAdminU_;
.
.
.
: menuText_("Open Command Prompt Here...")
, menuTextAdmin_("Open an Elevated Command Prompt Here...")
, menuDesc_("Opens a Command Prompt in the selected folder, or in the folder containing the selected file.")
, menuDescAdmin_("Opens an Elevated (Admin) Command Prompt in the selected folder, or in the folder containing the selected file.")
, menuDescU_(L"Opens a Command Prompt in the selected folder, or in the folder containing the selected file.")
, menuDescAdminU_(L"Opens an Elevated (Admin) Command Prompt in the selected folder, or in the folder containing the selected file.")
I don't believe any of these variables are necessary, and each string should be defined only once. Here's a way to implement this:
1. Define a "_W()" macro, similar to "_T()" macro:
#define __W(x) L ## x
#define _W(x) __W(x)
2. Define each unique string:
#define OPENFOLDER "OpenFolder"
#define MENUTEXT "Open Command Prompt Here..."
etc.
3. To use a string:
OPENFOLDER ==> when you need "OpenFolder" (ANSI version)
_T(OPENFOLDER) ==> when you need the ANSI or UNICODE string, depending on definition of <code>UNICODE</code> preprocessor macro
_W(OPENFOLDER) ==> when you need L"OPENFOLDER" (UNICODE version)
Of course, I realize that the purpose of the article is to discuss shell extensions, but I think this technique will help simplify the code.
This is a very useful article. I think you could expand it if you want, and go into more detail about context menu shell extensions; what the .rgs file does; how to debug without getting snarled by Explorer; how a shell extension can communicate with a "mother app"; and maybe even (supposedly this is fixed in .NET 4.0) why using C# for a shell extension prior to 4.0 is a bad idea.
|
|
|
|
 |
|
 |
Hi Hans,
Always open to suggestions, it's one of the reasons I write articles for the CodeProject, thanks for taking the time to help.
I like your suggestion and will do a mini-update at the weekend with a view to extending the article later on when I have more time.
I've already fixed the UNICODE issues and will update a new version of the article to CodeProject over the weekend.
regards,
Jonathan
|
|
|
|
 |
|
 |
I just tried the Unicode Debug and Unicode Release builds and both get compile errors. Are these supposed to work?
|
|
|
|
 |
|
 |
Hi Hans,
Never tried them to be honest , I will check it out tomorrow and fix as necessary, expect an update in a couple of days.
If you want the fixed source tomorrow then let me know and I'll email it to you.
regards,
Jonathan
|
|
|
|
 |
|
 |
Hi Jonathan,
OK, thanks for letting me know. If you're going to be diving into the code, you may want to add two more build configurations for x64. I'm thinking that both x64 configurations should be Unicode, since all x64 Windows OS's are Unicode. The way I've seen other commercial apps handle this is to name the x64 DLL differently; e.g., "foox64.dll". That way, if the user chooses to install the shell extension from the main app, you can simply register foox64.dll if you're running on a 64-bit OS, or the 32-bit foo.dll if not.
BTW, I've got a small function that tells you whether it's a 64-bit OS, without all the WMI stuff, if you want it.
|
|
|
|
 |
|
 |
Hi Hans,
I will add the extra configurations as they make sense, thanks for suggesting them.
If you could send me the 64-bit OS check I would be very grateful.
regards,
Jonathan
|
|
|
|
 |
|
|
 |
|
 |
Thanks again Hans,
Appreciate it - will let you know as soon as I've updated the code.
regards,
Jonathan
|
|
|
|
 |
|
 |
I know this is a tiny little article and will probably get flamed, but it only a small utility and I have had several requests for its source code.
No need to be so self-effacing. Nice little utility - simple, but very useful. I've installed it on my system, and gave you a five. Thanks!
|
|
|
|
 |
|
 |
Thank you, I appreciate the feedback and I'm just glad someone else likes it besides me
regards,
Jonathan
|
|
|
|
 |
|
 |
This is funny, I've actually been working on the exact same idea (that's how I came across your article). The only thing left that I want to do is add a context menu item bitmap (the command prompt icon) but it's been quite a pain and I haven't gotten it working yet (I'm using XP).
modified on Monday, October 26, 2009 4:34 AM
|
|
|
|
 |
|
 |
Thanks
I added the bitmap for the little UAC shield for Vista - and you're right it's not especially easy to do, have a look at my code and you should be able to figure it out.
I need to fix a little bug on Windows 7 whereby the "Open Elevated Command Prompt Here" item doesn't appear so should be releasing a new verion in a few days.
regards,
|
|
|
|
 |