Skip to content

Add TypedPaths and common-dialogs MRU cleaners - #3

Open
EnriqueGF wants to merge 1 commit into
TheCruZ:mainfrom
EnriqueGF:comdlg-mru-typedpaths
Open

Add TypedPaths and common-dialogs MRU cleaners#3
EnriqueGF wants to merge 1 commit into
TheCruZ:mainfrom
EnriqueGF:comdlg-mru-typedpaths

Conversation

@EnriqueGF

Copy link
Copy Markdown
Contributor

Summary

  • ClearTypedPaths: HKCU ...\Explorer\TypedPaths stores every path typed into the Explorer address bar as PathN (REG_SZ), ordered by letters in MRUList. Removes only values matching the needles and repairs the matching letter out of MRUList (both cases).
  • ClearCommonDialogsMru: ComDlg32\OpenSavePidlMRU keeps the last files chosen through GetOpenFileName/GetSaveFileName per executable, and LastVisitedPidlMRU the last folder per executable. Values are MRUItemN blobs (pidl with an embedded UTF-16 path) ordered by MRUListEx. A subkey named like one of the needles belongs to the target app and goes away whole; foreign subkeys only lose the matching MRUItemN values, reusing the existing RemoveMruIndex to repair MRUListEx.

Both are wired into ClearAllExecutionTraces and follow the same selective rule as the existing cleaners (unknown/foreign entries are kept).

Context

Found while wiring these into our own launcher sweep: any app that uses the common file dialogs leaves per-app entries in OpenSavePidlMRU even when it never touches RecentDocs, and address-bar navigation lands in TypedPaths. Same registry-MRU family as the Shellbags/RunMRU work from the previous PRs.

Verification

  • MSVC compile check of the header (cl /std:c++17 /DUNICODE /D_UNICODE, VS 2022 BuildTools + WDK 10.0.26100 headers): clean.
  • The Rust port of these two sweeps is covered by a runtime registry test in our consumer repo (plants matching/foreign entries, sweeps, asserts only own entries removed and MRUListEx/MRUList repaired).

Adds two selective cleaners to ClearAllExecutionTraces:

- ClearTypedPaths: removes Explorer address-bar PathN values matching a
  needle and repairs the matching letter out of MRUList.
- ClearCommonDialogsMru: OpenSavePidlMRU/LastVisitedPidlMRU keep the last
  files/folder per executable as MRUItemN blobs (pidl with an embedded
  UTF-16 path) ordered by MRUListEx. Own-app subkeys are removed whole;
  foreign subkeys only lose the matching MRUItemN values, repairing
  MRUListEx. Reuses the existing RemoveMruIndex helper.

Same selective rule as the other cleaners: unrelated entries are kept.
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

Successfully merging this pull request may close these issues.

1 participant