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

Pinned Start Shortcuts #35

Closed
EmperorCrusher opened this issue Mar 1, 2024 · 8 comments
Closed

Pinned Start Shortcuts #35

EmperorCrusher opened this issue Mar 1, 2024 · 8 comments
Assignees
Labels
duplicate This issue or pull request already exists

Comments

@EmperorCrusher
Copy link

Thanks for the work you've done. I've found that there are a couple of pinned shortcuts that I'd like to see removed. Grammarly and Luminar Neo-AI Photo Editor. If I right click I can only unpin from start, so they are shortcuts and not installed apps. If I click on them, Windows takes me to the Windows Store. I've looked in all the locations I've read where Pinned items reside, but don't see them. Sorry I can't be of any further assistance in locating them. Thanks again.

Pinned

@Raphire
Copy link
Owner

Raphire commented Mar 2, 2024

Heya,

This is actually an issue that has been brought up in an earlier issue: #16

Unless things have changed, and I don't think they have. The start menu pinned items in windows 11 are stored in a binary file that can't be edited as far as I know.

Win11Debloat does however have an option to fully clear all pinned apps from the start menu by replacing this binary file. This option is available if you select custom setup when you run the script.

I get that's not the ideal solution, but it does allow you to customize the start menu from scratch.

@Raphire Raphire self-assigned this Mar 2, 2024
@Raphire Raphire added the duplicate This issue or pull request already exists label Mar 2, 2024
@EmperorCrusher
Copy link
Author

@Raphire, thanks for the reply. I understand that's the only solution at this time. The issue I have with the solution of clearing all pinned apps is that it takes longer to put the apps up that I want. It's simply faster to right click and unpin the bloat. However, I have some questions and a thought. Where is the binary file located and what is it's name? My thought in the form of a question is could an option be added to copy a custom made binary to that location and thereby quickly configure the pinned items to be what we want instead of what Microsoft wants? I'd be happy to test this idea.

I'm the owner of a single person IT business and I have about 160 W10 PCs to upgrade to Windows 11 or to replace with Win11 PCs. This script is going to save me a lot of time and fixing the pinned item issue will also save me time. If it saves me time, I believe it's going to save IT companies all over the world a lot of time as well.

@EmperorCrusher
Copy link
Author

@Raphire, so I did a little more digging and found this article https:\winaero.com/how-to-backup-pinned-apps-in-start-menu-in-windows-11. The location of the binary file you are referring to is here.

%LocalAppData%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState

The binary file name is start2.bin or sometimes a permutation of that name in the form if start*.bin. I saved the original start2.bin and then removed a couple of icons. The modified time of start2.bin changed to the current time. I renamed start2.bin and copied the original start2.bin back and terminated the StartMenuExperienceHost.exe task as follows.

taskkill /im StartMenuExperienceHost.exe

When I clicked the Start button, the icons I removed were back. BTW, clicking the Start button relaunches StartMenuExperienceHost.exe.

So, if one was to customize the pinned start items to the way like it and then save the start2.bin file, they could replace the start2.bin file in a Windows 11 instance and after terminating the StartMenuExperienceHost.exe task the customized start menu would take over.

I'll also add that after using @Raphire Win11Debloat script to remove LinkedIn, it remained in the pinned items. Typically when right clicking on that pinned item, one can uninstall it. But after running the script, I could only remove it from pinned. While the script triggered the process that removed the app, that process did not remove the shortcut from the pinned items. The shortcut took me to the Microsoft Store to install LinkedIn. Microsoft is being a very tricksy hobbit and not cleaning up completely. But by replacing the start2.bin file with a customized version I can thwart their tricksy schemes.

One has to consider whether or not Win11Debloat should replace the start2.bin with their own customized version or not (if the option is selected). How does one determine what should or should not in the pinned items? Perhaps by putting a version that has common bloat removed as a default placeholder start2.bin. Then anyone can customize their own start2.bin file and replace the default placeholder with their own.

@Raphire
Copy link
Owner

Raphire commented Mar 2, 2024

@Raphire, so I did a little more digging and found this article https:\winaero.com/how-to-backup-pinned-apps-in-start-menu-in-windows-11. The location of the binary file you are referring to is here.

%LocalAppData%\Packages\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\LocalState

The binary file name is start2.bin or sometimes a permutation of that name in the form if start*.bin. I saved the original start2.bin and then removed a couple of icons. The modified time of start2.bin changed to the current time. I renamed start2.bin and copied the original start2.bin back and terminated the StartMenuExperienceHost.exe task as follows.

taskkill /im StartMenuExperienceHost.exe

When I clicked the Start button, the icons I removed were back. BTW, clicking the Start button relaunches StartMenuExperienceHost.exe.

So, if one was to customize the pinned start items to the way like it and then save the start2.bin file, they could replace the start2.bin file in a Windows 11 instance and after terminating the StartMenuExperienceHost.exe task the customized start menu would take over.

This is all correct and it's actually what Win11Debloat currently uses to clear the start menu of all pinned apps. Win11Debloat copies the start2.bin file that comes with the script (found in the Start folder). If you replace that start2.bin file with your custom variant you can use Win11Debloat to set your customized start menu :)

I'll also add that after using @Raphire Win11Debloat script to remove LinkedIn, it remained in the pinned items. Typically when right clicking on that pinned item, one can uninstall it. But after running the script, I could only remove it from pinned. While the script triggered the process that removed the app, that process did not remove the shortcut from the pinned items. The shortcut took me to the Microsoft Store to install LinkedIn. Microsoft is being a very tricksy hobbit and not cleaning up completely. But by replacing the start2.bin file with a customized version I can thwart their tricksy schemes.

Yup, because it's not the actual app but a 'link' to download the app Win11Debloat cannot delete it the normal way. I have not found a way to remove these other than replacing the start2.bin file or removing them manually of course.

One has to consider whether or not Win11Debloat should replace the start2.bin with their own customized version or not (if the option is selected). How does one determine what should or should not in the pinned items? Perhaps by putting a version that has common bloat removed as a default placeholder start2.bin. Then anyone can customize their own start2.bin file and replace the default placeholder with their own.

It's difficult to make default that works for everyone. It might be possible to add an option for users to copy their current start menu file, so they can replace their start menu with that instead of clearing their start menu completely. I'll have to look into the feasibility of that though.

@EmperorCrusher For now you can manually replace the start2.bin that comes with the script with your own version as explained earlier.

@EmperorCrusher
Copy link
Author

@Raphire thank you for the explanation. That will solve the issue.

@EmperorCrusher
Copy link
Author

EmperorCrusher commented Mar 5, 2024

@Raphire, just a few extra comments from something I found today. I like to run the script and select the new Option 3 to use the saved settings. Thanks for that! I've selected to remove the pinned Start Menu items, which replaces the Start2.bin file with my own custom start2.bin file. However, after running the debloat one time, some items like LinkedIn and Grammarly are still there. If I run the debloat a second time, the start2.bin file is replaced properly. Could it be that the timing is not correct and you are replacing the start2.bin file before Microsoft completes the app uninstalls and Microsoft puts the links back in the pinned Start Menu that was cleared out?

@EmperorCrusher EmperorCrusher reopened this Mar 5, 2024
@Raphire
Copy link
Owner

Raphire commented Mar 5, 2024

Heya,

Glad you like the saved settings option in the script menu :)

I am unable to reproduce the issue you describe of pinned items unexpectedly remaining in the start menu after running the script. I tested with both the default start2.bin, which emptied the startmenu as expected, aswell as with a start2.bin with pinned apps.

It's likely that the start menu process didn't restart as it should have, but that's just a guess.

@EmperorCrusher
Copy link
Author

Thanks for looking into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants