views:

481

answers:

2

I have a program which makes use of a desktop Namespace extension. In Windows 2000, Windows XP, and Windows Vista, users can drag icons onto an icon on the desktop and the program is launched. However, in Windows 7 (both Home and Ultimate), all that happens is the icon order is rearranged. I tried using Sysinternals dbgview.exe. It correctly noticed many events from handler.exe, but no events are triggered by dragging an icon onto the namespace icon, which means the drophandler isn't even being called at all.

As it still works properly, there must be something Windows 7 requires that previous versions of the OS did not.

The namespace extension is installed by stuffing the relevant keys into the registry, and I'd like to keep the installer working that way:

HKCR\CLSID\{{MY-NAMESPACE-GUID}:():"Caption"
HKCR\CLSID\{{MY-NAMESPACE-GUID}:(Drop):"""c:\programpath\program.exe"" /argument ""%s"""
HKCR\CLSID\{{MY-NAMESPACE-GUID}\InProcServer32:():"""c:\programpath\handler.exe"""
HKCR\CLSID\{{MY-NAMESPACE-GUID}\InProcServer32:ThreadingModel:"Apartment"
HKCR\CLSID\{{MY-NAMESPACE-GUID}\DefaultIcon:():"""c:\programpath\program.exe"",4"
HKCR\CLSID\{{MY-NAMESPACE-GUID}\Shell\Open\Command:():"""c:\programpath\program.exe"""
HKCR\CLSID\{{MY-NAMESPACE-GUID}\shellex\DropHandler:():{MY-GUID-HANDLER}
HKCR\CLSID\{{MY-NAMESPACE-GUID}\shellex\PropertySheetHandlers(): {MY-GUID-HANDLER}
HKCR\CLSID\{{MY-NAMESPACE-GUID}\ShellFolder():00 01 00 00
HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\Namespace\{{MY-NAMESPACE-GUID}:():"Caption"
A: 

Windows 7's UAC could be preventing the desired drag and drop behavior. If the dragged item has lesser permissions than the target item, the target won't launch. Perhaps you can turn off UAC?

raven
It's not a shortcut, it's a namespace extension. Regardless, it's not a UAC problem, and turning off UAC has no impact.
Brian
A: 

ShellFolder needs to have the SFGAO_BROWSABLE bit (0x08000000) set when on Windows 7.

Brian