Win32::ShellExt - Perl module for implementing context menu extensions of the Windows Explorer
# Sample usage of that module: package Win32::ShellExt::CopyPath; use strict; use Win32::ShellExt; use Win32::Clipboard; $Win32::ShellExt::CopyPath::VERSION='0.1'; $Win32::ShellExt::CopyPath::TEXT="Copy path to clipboard"; @Win32::ShellExt::CopyPath::ISA=qw(Win32::ShellExt); sub query_context_menu() { "Win32::ShellExt::CopyPath"; } sub action() { my $self = shift; my $CLIP = Win32::Clipboard(); $CLIP->Set(join '\n',@_); 1; } sub hkeys() { my $h = { "CLSID" => "{E06853EF-4421-409C-BCFE-B2A048536F67}", "name" => "copy path shell Extension", "alias" => "copy_path_menu", "package" => "Win32::ShellExt::CopyPath" }; $h; } 1;
This module is never used directly. You always subclass it into your own package, then do a one-time invocation of the install() method on your package (to install the needed registry keys). Then you should have a new entry in the contextual menu of the Windows explorer (the files for which this menu entry appears depend on the filtering you do in the query_context_menu method), and your action() method gets called upon clicking the corresponding menu command in the Explorer.
Blah blah blah.
None by default. None needed.
Jean-Baptiste Nivoit <jbnivoit@hotmail.com>
perl.
To install Win32::ShellExt, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Win32::ShellExt
CPAN shell
perl -MCPAN -e shell install Win32::ShellExt
For more information on module installation, please visit the detailed CPAN module installation guide.