Repository navigation
Add apply --seed to set an editable taskbar layout without locking it - #11
Open
rodchristiansen wants to merge 2 commits into
Open
rodchristiansen wants to merge 2 commits into
rodchristiansen wants to merge 2 commits into
Conversation
apply always wrote LockedStartLayout = 1, so a package could enforce a layout but never seed one that users can change afterwards. --seed does everything apply does, for the current user and with --allhomes, but writes LockedStartLayout = 0. list still reports a seeded layout as active. The default stays locked.
…ed #4265 After apply --seed users can change their pins, so list now labels the policy layout as seeded and counts the pins actually on the taskbar instead of reporting the seeded pins as configured via policy. Locked and direct-copy layouts print as before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
taskbarutil apply --seeddoes everythingapplydoes (resolve the layout, set the policy, clear the start2.bin and Taskband caches, restart explorer) but writesLockedStartLayout = 0instead of1.PolicyManager.Apply) and for every profile with--allhomes(PolicyManager.ApplyAllHomes).listshows a seeded layout as "seeded, editable" and counts the pins actually on the taskbar, since users may have changed them; a locked layout prints as before.--dry-runreports whether the layout would be locked.0value in the policy table.Default behaviour is unchanged: without
--seed, apply still locks the layout.Why
apply always locked the layout, so a package could enforce a taskbar but never hand users a starting layout they are free to change. That is the difference between a login-every package (enforced) and a login-once package (seeded) that dockutil users get on the Mac by simply not re-running the script.
How it was tested
dotnet build TaskbarUtil.sln -c Release(cross-targeted from macOS): 0 warnings, 0 errors.dotnet test: 53 passed, 0 failed.Check before merging
taskbarutil apply --seed, rearrange or unpin something, then sign out and back in. Confirm the user's changes survive and the unlockedStartLayoutFiledoes not re-assert the seeded pins on the next sign-in.--allhomes --seedwritesLockedStartLayout = 0under each loaded HKU hive.