Jump to content

Recommended Posts

Posted (edited)

Hello,

this was my question to ChatGPT:

Is it possible to dynamically enrich the desktop context menu in Windows with with calculated values, perhaps underneath “HKEY_CLASSES_ROOT\DesktopBackground” ?

and one of the suggestions was:

Use of shell extensions (Shell Extensions):
A more complex, but also more powerful method would be to develop a shell extension for Windows. With a shell extension you could dynamically insert dynamically calculated content in the context menu.

To do this, you would have to write a COM DLL that is loaded by Windows when the context menu is displayed. This DLL can then perform the desired calculations and adapt the menu dynamically.

Example:
A COM DLL that implements the IContextMenu interface could be used to dynamically add elements to the context menu. This DLL must then be registered in the registry under the corresponding context
(e.g. HKEY_CLASSES_ROOT\DesktopBackground\ShellEx\ContextMenuHandlers).

Any clue how to insert such a COM DLL handler to trigger an AutoIT script, that will build up and provide the information, that I want to see in the desktop context menu?

 

This shall a list of Scan to SMB folders, with the number of documents behind the folder name, like in this screenshot (the autoit script is not the trouble, that's easy)

The cascaded desktop background menu without this dynamic information, how many documents are in each folder, is quite easy as well:

 

image.png.4a8677c8c7fb2eccac7d345ae4068e61.png

 

Statically it's just this one:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Scanner Ordner öffnen]
"icon"="shell32.dll,122"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Scanner Ordner öffnen\shell]

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Scanner Ordner öffnen\shell\Einkauf]
"MUIVerb"="Einkauf"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\Scanner Ordner öffnen\shell\Einkauf\command]
@="explorer.exe /n, /e, H:\\daten\\scan2FTP\\Xerox-Einkauf"

 

Edited by rudi
not nice line wrapping in chatgpt reply box

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Posted

Bump.

Any direction how to realize such a COM DLL handler to enrich the desktop's background context menu dynamically, or does somebody know such a COM DLL handler, that could be feed by parameters through an autoit script?

CU, Rudi.

Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...