Page 1 of 1

Context menu icon

Posted: Sat Aug 21, 2021 6:30 am
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"

Re: Context menu icon

Posted: Wed Sep 01, 2021 2:17 pm
by xnview
ok i'll add it

Re: Context menu icon

Posted: Wed Sep 01, 2021 4:00 pm
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\""

Re: Context menu icon

Posted: Fri Sep 10, 2021 1:30 pm
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?


Re: Context menu icon

Posted: Mon Sep 13, 2021 9:24 am
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

Re: Context menu icon

Posted: Mon Sep 13, 2021 3:00 pm
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).