Context menu icon

Ideas for improvements and requests for new features in XnView Classic

Moderators: XnTriq, xnview

Post Reply
User avatar
XnTriq
Moderator & Librarian
Posts: 5773
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Context menu icon

Post by XnTriq »

XnView v2.50 on Windows 10 Pro 20H2 (64-bit)

Activating Add 'Browse with XnView' to context menu in ToolsOptions…System integrationIntegration adds the following entries to the registry:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Browse with XnView]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Browse with XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Browse with XnView\DefaultIcon]
@="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Browse with XnView]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Browse with XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Browse with XnView\DefaultIcon]
@="C:\\Program Files (x86)\\XnView\\xnview.exe,0"
However, in order for the icon to show up in the context menu, we need these additional entries:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Drive\shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"
… and perhaps also:

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

Code: Select all

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\Background\shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"
User avatar
xnview
Author of XnView
Posts: 35858
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Context menu icon

Post by xnview »

ok i'll add it
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 5773
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Context menu icon

Post by XnTriq »

Thanks for considering, Pierre.
So that would be drive, folder, directory and directory background:

Code: Select all

Windows Registry Editor Version 5.00

; Browse with XnView from context menu of Windows 10 Pro

[HKEY_CLASSES_ROOT\Directory\shell\XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Directory\shell\XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Directory\shell\XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell\XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Drive\shell\XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Folder\shell\XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Folder\shell\XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""
User avatar
XnTriq
Moderator & Librarian
Posts: 5773
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Context menu icon

Post by XnTriq »

Thanks for fixing the issue in v2.50.1 for Directory

Code: Select all

[HKEY_CLASSES_ROOT\Directory\Shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Directory\Shell\Browse with XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Directory\Shell\Browse with XnView\DefaultIcon]
@="C:\\Program Files (x86)\\XnView\\xnview.exe,0"
… and Drive:

Code: Select all

[HKEY_CLASSES_ROOT\Drive\Shell\Browse with XnView]
"Icon"="C:\\Program Files (x86)\\XnView\\xnview.exe,0"

[HKEY_CLASSES_ROOT\Drive\Shell\Browse with XnView\command]
@="\"C:\\Program Files (x86)\\XnView\\xnview.exe\" \"%1\""

[HKEY_CLASSES_ROOT\Drive\Shell\Browse with XnView\DefaultIcon]
@="C:\\Program Files (x86)\\XnView\\xnview.exe,0"
Folder (as well as Directory\Background and DesktopBackground) are still missing, though:
https://docs.microsoft.com/en-us/windows/win32/shell/reg-shell-exts#predefined-shell-objects wrote:

Code: Select all

Folder               | All folders
Directory            | File folders
Directory\Background | File folder background
DesktopBackground    | Desktop background (Windows 7 and higher)
Drive                | All drives in MyComputer, such as "C:\"
Are you sure that DefaultIcon is needed, Pierre?

User avatar
xnview
Author of XnView
Posts: 35858
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Context menu icon

Post by xnview »

XnTriq wrote: Fri Sep 10, 2021 1:30 pm Folder (as well as Directory\Background and DesktopBackground) are still missing, though:
So same keys as Directory?
Are you sure that DefaultIcon is needed, Pierre?
not sure, but perhaps Windows 7
Pierre.
User avatar
XnTriq
Moderator & Librarian
Posts: 5773
Joined: Sun Sep 25, 2005 3:00 am
Location: Ref Desk

Re: Context menu icon

Post by XnTriq »

xnview wrote: Mon Sep 13, 2021 9:24 am
XnTriq wrote: Fri Sep 10, 2021 1:30 pmFolder (as well as Directory\Background and DesktopBackground) are still missing, though:
So same keys as Directory?
Yes (Classic and MP).

xnview wrote: Mon Sep 13, 2021 9:24 am
Are you sure that DefaultIcon is needed, Pierre?
not sure, but perhaps Windows 7
Right (7 and Vista).
Post Reply