My software works as shell extension, and register himself for showing on Background/Directory and Desktop right click menu. I developing on Win XP and it’s works good, but now when i testing it on Windows 7, does not want work well. Context item exists only on Desktop right click menu, but does not on Background/Directory. Need help!
Here is reg function in Delphi, but examples on any language accepted, i can show extension DLL src if needed!
const
CLSID_ContextMenu = '{AB69D961-B907-11D0-B8FA-A85800C10000}';
procedure TForm1.Button1Click(Sender: TObject);
var
Reg: TRegistry;
begin
Reg := TRegistry.Create;
try
with Reg do
begin
RootKey := HKEY_CLASSES_ROOT;
OpenKey('\CLSID\' + CLSID_ContextMenu, True);
WriteString('', 'Context Menu Shell Extension');
OpenKey('\CLSID\' + CLSID_ContextMenu + '\InProcServer32', True);
WriteString('', ExtractFilePath(Application.ExeName) + '\Project1.dll');
WriteString('ThreadingModel', 'Apartment');
CreateKey('\Directory\Background\ShellEx\ContextMenuHandlers\' + CLSID_ContextMenu);
end;
finally
Reg.Free;
end;
end;
I found it! In XP i wrote to
but in Windows 7 the path should be like
and in command we put a path to our app in double quotes “%path%”.:)