Taskbar App Memory
Apps you choose go back to their place on the taskbar when they reopen, instead of to the end
Author: buedgik
On the Windows 11 taskbar, an app that isn't pinned loses its place when you
close it: open it again and its button goes to the end. With this mod, the
apps you choose go back where they were.

- Choose the apps: right-click an empty part of the taskbar, open
Remember positions (Lembrar posições on a Portuguese Windows), and tick
the apps whose place should be kept. It lists the open apps that aren't
pinned (pinned apps stay where Windows puts them anyway), then the ticked
apps that are closed or pinned since, so you can untick those too. In the
mod's settings you can have every app remembered instead; the submenu then
only says so.
- Arrange the buttons by dragging them, as usual. The mod remembers where
you leave the ticked apps.
- Close a ticked app and open it later, even after restarting the
computer: its button goes back between the same neighbours it had.
- The other apps go where Windows puts them, as usual. The mod keeps track
of where they are, since the ticked apps are placed next to them.
- Pinned apps stay where Windows puts them. The mod never moves them, it
only uses them as landmarks: a ticked app you left between two pinned apps
goes back between them.
How the place is chosen
The mod keeps one list of every app it has seen on the taskbar, in the order
they were last seen, closed apps included. When a ticked app opens, its button
goes right after the nearest app that comes before it in that list and is on
the taskbar now. When none of those are there, it goes in front of the apps on
the taskbar that the list has.
So the order you arrange is kept whatever order the apps open in, which is
what makes it survive a restart: the apps that start with Windows each go to
their place as they appear. A ticked app's place is certain next to pinned
apps and other ticked apps; next to apps that aren't ticked it can shift,
since those go wherever Windows puts them.
Only what happens while the mod is running is learned. Ticked apps rearranged
while it's disabled go back to their old places when they reopen; drag them
with the mod on to change that. Pinned apps are the exception: when their
order changes without a drag (another program moving a pin, or pins moved
while the mod was off), the mod follows it from the next time a button opens
or is dragged. Until then, an app next to the pin that moved can come back on
its other side if it closes first, or if Explorer restarts (adding a separator
with Taskbar Icon Separators is one such change).
Worth knowing
- Apps are told apart by their App ID, the identity Windows uses to put
windows under one button. An app that changes it is a new app to the mod:
a browser's new profile, or a portable app moved to another folder.
- A ticked app you unpin keeps the place it had among the pinned apps:
when it opens again, it goes there (with All apps, every app does). Drag it
once to put it somewhere else. An app that isn't ticked opens at the end,
like any other.
- Only the order of the buttons is kept, not the order of the windows
inside one button.
- With several monitors there is one list for all the taskbars, and each
taskbar places an app relative to the apps it shows. With "Show my taskbar
apps on: All taskbars" (the default), Windows keeps the taskbars in the same
order after each drag. Not after pinning an app from Start, though: the new
pin goes to the end of the main taskbar but among the pinned apps on the
others, and until the next drag an app next to it there can come back on
its other side. With the two "taskbar where window is open" settings, an app
can have a button on two taskbars but has one place in the list, so arrange
the apps on the main taskbar (ticking an app shown only on another monitor
takes its place from that monitor, which can put it on the other side of a
pinned app on the main taskbar); and on the other taskbars, where the pinned
apps aren't shown, a pinned app's button is left where Windows puts it.
- Switching virtual desktops takes buttons off the taskbar and puts them
back; the ticked ones come back in the remembered order.
- With the Taskbar Grouping mod, which can give each window a button of its
own, a ticked app's first button goes back to its place, and the buttons of
its other windows go where Taskbar Grouping's settings say. Their places
aren't remembered: an app that sat right next to another app's extra-window
buttons can come back on their far side, and dropping an app between another
app and that app's extra windows isn't kept. When the first window closes,
Taskbar Grouping passes its identity on to another of the app's windows, and
that window's button becomes the app's place.
- The list is the file
order.txt, in the mod's storage folder, in a
folder named after your account's SID. With Windhawk's logging on, the mod
writes its exact path to the log when it starts ("Order file: ..."). It's
read when the mod starts and rewritten while it runs: to reset or edit it,
disable the mod, delete or edit the file, then enable the mod again. Its
first line is taskbar-app-memory v1, and each line after it is one app, in
order, with tabs between: the day it was last seen, r if it's ticked or
- if not, its App ID, and its name. A file the mod can't read is moved
aside as order.txt.<date>-<time>.bad; one it can only read in part is
copied there, then rewritten with the lines it could read. Uninstalling the
mod deletes the folder. Past 256 apps, the ones not seen for the longest
time are forgotten, ticked ones last.
- If the submenu doesn't appear (the mod's log says "No menu"), choose
All apps in the settings, or, with the mod disabled, change the
- to r
on the app's line in order.txt.
- Windows 11 with its own taskbar, tested on 25H2 (build 26200) with four
monitors. With the old taskbar that ExplorerPatcher or StartAllBack bring
back, the mod does nothing. On 21H2, and on 22H2 without recent updates,
buttons may still open at the end.