Skip to content

AppUserModelID (AUMID) improvements #477

@ProgerXP

Description

@ProgerXP

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).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions