Classic Shell
http://www.classicshell.net/forum/

Losing my mind trying to clear recent items from Start Menu
http://www.classicshell.net/forum/viewtopic.php?f=7&t=5950
Page 1 of 1

Author:  jwhitetoo [ Sun Apr 24, 2016 7:53 am ]
Post subject:  Losing my mind trying to clear recent items from Start Menu

Greetings,

I'm trying to figure out how to clear out all items on the start menu to "Day 1 Empty" via batch file and/or script and/or PowerShell. OS is Windows 8.1

From researching in these boards I know Classic Shell stores it's pins [via "Pin to Start Menu (Classic Shell)] in this folder...
%APPDATA%\ClassicShell\Pinned\*.*

...and that recent/auto-added items like Notepad and Clarify in my screenshots below are stored here:
%APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*
%APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*



I've tried running running variations of the below batch files, searched the registry, observed 'under the hood' via ProcMon. I've tried quitting/re-launching ClassicStartMenu.exe and Explorer at the end of this batch file and before/after as shown and I can verify in all cases AutomaticDestinations and CustomDestinations are being cleared as intended. (logging off/on as well)

"C:\Program Files\Classic Shell\ClassicStartMenu.exe" -exit
taskkill /f /im explorer.exe
sleep 2

del /F /Q %APPDATA%\ClassicShell\Pinned\*.*
del /F /Q %APPDATA%\Microsoft\Windows\Recent\*
del /F /Q %APPDATA%\Microsoft\Windows\Recent\AutomaticDestinations\*
del /F /Q %APPDATA%\Microsoft\Windows\Recent\CustomDestinations\*

start explorer.exe
sleep 3

"C:\Program Files\Classic Shell\ClassicStartMenu.exe"

And of course I've played with the registry as well, but no matter what I do I've thus far been unable to clear out 'recent' apps: :(



As I'd love to move past this my hope is I've missed something really simple, and so next I'll click Submit to this post and from there eagerly anticipate an 'Oh DUH' moment compliments of this forum. :D

- James

Attachments:
ClassicShell2.png
ClassicShell2.png [ 29.75 KiB | Viewed 13337 times ]
ClassicShell1.png
ClassicShell1.png [ 38.12 KiB | Viewed 13337 times ]

Author:  Ivo [ Sun Apr 24, 2016 8:03 am ]
Post subject:  Re: Losing my mind trying to clear recent items from Start M

The recent programs are stored in HKCU\Software\IvoSoft\ClassicStartMenu\MRU
The frequent programs are stored in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist

Author:  jwhitetoo [ Sun Apr 24, 2016 11:09 am ]
Post subject:  Re: Losing my mind trying to clear recent items from Start M  Topic is solved

Ivo wrote:
The recent programs are stored in HKCU\Software\IvoSoft\ClassicStartMenu\MRU
The frequent programs are stored in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist

THANK YOU! :D

I was absolutely aware of .\IvoSoft\ClassicStartMenu\MRU and had cleared it out but that alone had not been enough. I'd also been looking at the UserAssist but it wasn't obvious what was stored in there until your reply sent me looking deeper.


For future viewers of this thread, here's a great primer on UserAssist:
https://windowsexplored.com/2012/02/06/a-quick-glance-at-the-userassist-key-in-windows/
And here's the PowerShell lines I've used to clear out the caches in question. Note that per my batch file above I stop both the ClassicMenu and Explorer processes, run this PowerShell and then restart those processes and it seems to work perfectly:

Remove-Item -Path HKCU:"\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count"
Remove-Item -Path HKCU:"\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\Count"
Remove-Item -Path HKCU:"\Software\IvoSoft\ClassicStartMenu\MRU"

New-Item -Path HKCU:"\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}" -Name Count
New-Item -Path HKCU:"\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}" -Name Count
New-Item -Path HKCU:"\Software\IvoSoft\ClassicStartMenu" -Name MRU


A better solution would be a PowerShell script that doesn't delete the actual keys but instead just the values within. For my purposes, however, the above is fine.

Thanks again!

James

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/