How to pass multiple files to shell context menu command (Windows Explorer)

You can archive it with my program called singleinstance (sourcecode).
No shell extensions involved.

The main idea is that one instance of my program will be launched per file you have selected. It is checking if another instance of singleinstance program is running, and using Inter-Process Communication to notify the existing instance that other files have been selected.

Do not forget to set option MultiSelectModel=Player, otherwise number of files will be limited.


Usage: singleinstance.exe "%1" {command} $files [arguments]

Optional arguments for singleinstance (not passed to command):

--si-timeout {time to wait in msecs}

Sample registry file:

Windows Registry Editor Version 5.00


@="\"d:\\singleinstance.exe\" %1 \"C:\\Program Files\\Perforce\\p4merge.exe\" $files --si-timeout 400"

Deploying Windows applications on Linux(Wine) with InnoSetup

First, we need to detect Wine in the InnoSetup script.

function LoadLibraryA(lpLibFileName: PAnsiChar): THandle;
external 'LoadLibraryA@kernel32.dll stdcall';
function GetProcAddress(Module: THandle; ProcName: PAnsiChar): Longword;
external 'GetProcAddress@kernel32.dll stdcall';

function IsWine: boolean;
var  LibHandle  : THandle;
  LibHandle := LoadLibraryA('ntdll.dll');
  Result:= GetProcAddress(LibHandle, 'wine_get_version')<> 0;

The IsWine function returns true, if the installer is launched under Wine. My application (Image Uploader) is extensively using Microsoft Gdi+ library, but Wine's implementation of this library is incomplete, so I had no other choice but to install the native version of gdiplus.dll. The important thing is to tell Wine to use the native library instead of the built-in one, it can be achieved by writing a setting to the Wine's registry.

procedure CurStepChanged(CurStep: TSetupStep);
 if  CurStep=ssPostInstall and IsWine   then

     RegWriteStringValue(HKEY_CURRENT_USER, 'Software\Wine\DllOverrides',
    'gdiplus', 'native, builtin');

There are some other issues when Image Uploader is running in Wine, for example, Wine is ignoring WM_CTLCOLORSTATIC message's result, also Richedit's EM_FORMATRANGE is not working. But I hope I'll find a workaround for these issues too.

Symstorm - plugin adding support for Symfony2 in PhpStorm

Symfony 2 helper plugin for PHPStorm 6

Quickly navigate to your controller's action method by URL.

Press Ctrl+Shift+K in your project, paste url into the text box and your controller class will be opened in text editor.

It uses "php app/console router:dump-apache" to get project's routes, so php executable must be in your env path variable.



CRX: (Install in Google Chrome, Opera)



Small plugin for supporting Kohana in PhpStorm

Kohana 3 helper plugin for PHPStorm

It provides two simple features:

  • Navigate to a template from controller (from View::factory('...') )
  • Navigate to a controller by URL

Quickly navigate to your controller's action by URL. In order to enable this feature, you need to add the following code in the end of your boostrap.php:

if ( !empty( $_GET['ks_secret_key'] ) && ($_SERVER['REMOTE_ADDR'] == '' 
        || $_GET['ks_secret_key'] == 'your Secret Key' ) ){ 
     $req = Request::factory(); 
     die( 'KS;1;'.$req->directory().';'.$req->controller() .';'.$req->action() ); 

For older versions (Kohana 3.0):

if ( ( !empty( $_GET['ks_enable'] ) && $_SERVER['REMOTE_ADDR'] == '' ) 
         || !empty( $_GET['ks_secret_key']) && $_GET['ks_secret_key'] == 'your secret key' ) {
     $req = Request::instance(); 
     die( 'KS;1;'.$req->directory.';'.$req->controller .';'.$req->action ); 

Now you can press Ctrl+Shift+P in your project, paste url into the text box and your controller class will be opened in code editor. Enjoy!

You can get compiled jar here: