NAVIGATION: David's Corner > DIY Delphi > PMIO Shell Extension

SHELL EXTENSION FOR PINK MOUSE'S IMAGE ORGANISER

Pink Mouse's Image Organiser (PMIO for short) is an excellent image viewer, cataloguer, and HTML generator. It comes in freeware and shareware versions; I've had the freeware version on my system continuously for nearly three years, and wouldn't be without it.

The PMIO site is
HERE. It doesn't hold the freeware version any more, but NONAGS does.

I only miss one thing with PMIO; you can't right-click on a drive or folder and browse its contents with the program as you can with, say, IrfanView. PMIOShell is a solution to this. It's not very elegant, as you need a to run a separate Registry file to activate it; but it works, and works well. When activated, it adds an item to the Explorer context menu of drives and folders - "Browse with PMIO".

PMIOShell has been tested with the freeware version (1.2) and latest shareware version (3.0 beta) of PMIO. The code needs D2 or higher to compile. The executable must be placed in the same folder as PMIO, and the Registry file will need to be modified if PMIO isn't installed to "c:\program files\pmio" on your system.

PMIOShell has only been tested under Windows 95, 98 and ME - not NT4, 2000 or XP.

Because the project doesn't use any forms, the compiled program is small - under 60K. The code and REG file are below. A ZIP containing the excutable, the source and the REG file is available from
HERE.

You can cut and paste the source from below and save it as "pmioshell.dpr". The REG text can also be cut, pasted and saved as "pmioshell.reg"


** PMIOSHELL SOURCE BEGINS HERE**

program pmioshell;

uses
WinProcs, Registry;

{$R *.RES}

var Reg : TRegistry;
Location : string;

begin

if ParamCount <> 1 then exit;
// There must be one, and only one, parameter passed from the command-line
Location := ParamStr(1);
// The folder or drive is passed to PMIOShell from Explorer
Reg := TRegistry.Create;

try
with Reg do begin
RootKey := HKEY_CURRENT_USER;
if OpenKey('\Software\Pink Mouse Productions\Pink Mouse' +#39+ 's Image Organiser\Browser 1',true)
then WriteString('Folder', Location);
// This registry key remembers the last folder browsed by PMIO; PMIOShell
// changes the key to match
// the folder you want to browse.
end;
finally end;

WinExec('pmio.exe', sw_shownormal);
// Now launch PMIO with the new browse folder selected

end.

** PMIOSHELL SOURCE ENDS HERE **


** REGISTRY FILE BEGINS HERE **

REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\PMIO Shell Extension]
@="Browse with P&MIO"

[HKEY_CLASSES_ROOT\Directory\shell\PMIO Shell Extension\command]
@="C:\\Program Files\\PMIO\\PMIOShell.exe %1"

[HKEY_CLASSES_ROOT\Drive\shell\PMIO Shell Extension]
@="Browse with P&MIO"

[HKEY_CLASSES_ROOT\Drive\shell\PMIO Shell Extension\command]
@="C:\\Program Files\\PMIO\\PMIOShell.exe %1"

[HKEY_LOCAL_MACHINE\Directory\shell\PMIO Shell Extension]
@="Browse with P&MIO"

[HKEY_LOCAL_MACHINE\Directory\shell\PMIO Shell Extension\command]
@="C:\\Program Files\\PMIO\\PMIOShell.exe %1"

[HKEY_LOCAL_MACHINE\Drive\shell\PMIO Shell Extension]
@="Browse with P&MIO"

[HKEY_LOCAL_MACHINE\Drive\shell\PMIO Shell Extension\command]
@="C:\\Program Files\\PMIO\\PMIOShell.exe %1"

** REGISTRY FILE ENDS HERE **


UPDATE, OCTOBER 2001: Jon Croudy, the author of PMIO, has found this page, and has been in touch. He's in the process of developing version 4 of PMIO which (a) won't support PMIOShell, but (b) will have a shell extension system of its own. So any regular PMIO users of version 3 or below can continue to use PMIOShell; users of newer versions won't need to.