Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AppUserModelID (AUMID) improvements #477

Open
ProgerXP opened this issue Feb 3, 2024 · 0 comments
Open

AppUserModelID (AUMID) improvements #477

ProgerXP opened this issue Feb 3, 2024 · 0 comments
Assignees

Comments

@ProgerXP
Copy link
Owner

ProgerXP commented Feb 3, 2024

Windows uses AUMID strings to link different processes together to facilitate taskbar grouping (among other things). Notepad2 model is very simple and Windows' heuristic-based automatic AUMID is already good, but not good enough.

General info about AUMID: https://learn.microsoft.com/en-us/windows/win32/shell/appids

Notepad 2e should set its own AUMID based on the new AppUserModelID preference:

  • empty - don't assign specific AUMID, let Windows figure it (Notepad2 behaviour)
  • INI (default) - assign AUMID = absolute normalized path to the INI file in use; if INI isn't in use, do nothing (behaviour as per empty value above)
  • other - assign that AUMID string

This will allow Notepad2e.exe in different locations but using the same INI file to be grouped. This scenario is common when replacing Windows' built-in Notepad by overwriting %windir%\notepad.exe, %windir%\system32\notepad.exe and %windir%\syswow32\notepad.exe while storing settings in, say, %windir%\Notepad2.ini (as per https://github.com/ProgerXP/Notepad2e?tab=readme-ov-file#ini-file-location).


Related feature: maintain Recent Documents. But first, a question: if Notepad 2e is used in place of Notepad (see above), Windows somehow automatically maintains recent list in the Jump List of processes system32\notepad.exe (to test this, overwrite it with Notepad2e.exe and open a txt, ini or other similar text file). But for Notepad 2e in other places Jump List shows no recent section. How does this work if the code is the same in both processes? Also, why does it change the icon of the grouped button of system32\notepad.exe?

s

The icon is also different if you create a shortcut to system32\notepad.exe or syswow32\notepad.exe - Explorer doesn't even list all icons except that one (use the Change Icon button). It does this for %windir%\notepad.exe though (and in any other paths).

In any case, we should call SHAddToRecentDocs() for each file the user opens (via any means - Ctrl+O, Open Previous, drag & drop, etc.) except for bulk open (#250).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants