Skip to content

Options Menus Default

Duarte Ramos edited this page Sep 30, 2021 · 1 revision

Default menu entries define the behavior when opening/executing an item from the list. By adding additional entries here you can define custom file associations or personalized behaviors that override system defined ones by the operating system.

options menus default

How to use

Add a new entry for every association you wish to define. Associations may include several file types or even custom filters.

In the Filter field enter file extensions or file patterns separated by semi colon, for example *.jpg;*.jpeg;*.png Filters don't necessarily need to be a file extension, may be a pattern name or a file path like D:\Images\Photo*

Under Type choose Selected items, then use the Options field to write the path to the executable used to open a file like an .exe or .bat.

The Icon field allows defining a custom icon for the filtered files by pointing to either an .ico file, .exe, or .dll icon library.

This may be used to define portable file associations that override operating system defined ones and use applications from an external drive. To use a relative path you must install the X-Finder addon and use the %X-Finder% environment variable

Conditional associations

Using VBScript you can define more complex behaviors, for example prefer the system installed application to open an item, otherwise use the portable alternative. See example of using VBScript to check for the existence of an executable, otherwise use a portable application.

pg = "C:\Program Files\paint.net\PaintDotNet.exe"
if fso.FileExists(pg) then
  wsh.Run PathQuoteSpaces(pg) + ExtractMacro(te, " %Selected%")
else
  wsh.Run PathQuoteSpaces(BuildPath(GetParentFolderName(te.Data.Installed), "Portable\PaintDotNet.exe")) + ExtractMacro(te, " %Selected%")
end if

Paint.net

Clone this wiki locally