Launcher File Double-Click in Explorer

The following is a potentially useful hack if you have plenty of different java apps you need to launch from explorer but don’t want to create separate launcher files for each launcher configuration file.

Using Windows file associations we create a new file association for *.winrun4j to the WinRun4J launcher. The command executed is the new WinRun4J --WinRun4J:ExecuteINI command added in the previous release.

The following registry script updates the appropriate entries:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.winrun4j]
@="WinRun4JLaunch"
"PerceivedType"="text"

[HKEY_CLASSES_ROOT\.winrun4j\OpenWithList]

[HKEY_CLASSES_ROOT\.winrun4j\OpenWithList\WinRun4J.exe]

[HKEY_CLASSES_ROOT\WinRun4JLaunch]
@="WinRun4J Launcher Configuration"

[HKEY_CLASSES_ROOT\WinRun4JLaunch\DefaultIcon]
@="F:\\Development\\tools\\WinRun4J.exe"

[HKEY_CLASSES_ROOT\WinRun4JLaunch\shell]

[HKEY_CLASSES_ROOT\WinRun4JLaunch\shell\open]

[HKEY_CLASSES_ROOT\WinRun4JLaunch\shell\open\command]
@="F:\\Development\\tools\\WinRun4J.exe --WinRun4J:ExecuteINI %1"

This assumes that you have the latest version of the launcher saved into F:/Development/tools – if not just change the above entries to point to your folder.

The following screenshot shows a bunch of launcher files:

Now you can create any launch configuration and give it a .winrun4j extension and then double-click to launch.

Caveat: As per usual, make sure you backup your registry before modifying.

Advertisements

Comments are closed.

%d bloggers like this: