Repository navigation
fix: retire the Windows Copilot switch on Windows 11 24H2 and later - #3235
Merged
Merged
Conversation
The switch writes TurnOffWindowsCopilot, the policy that turns off the Windows Copilot pane and its taskbar button. Windows 11 version 24H2 replaced the pane with the Windows Copilot app, which ignores the policy, so there the switch read back as on after Apply and changed nothing, and the tab counted it among the protections that are active. From build 26100 on the switch is listed only while it is on, so it can be turned off to clear the policy, says it has no effect on this PC, and is not counted as a protection. On earlier builds, and when the build cannot be read, it is "Disable Windows Copilot" and says what the policy does, and that it does not affect the app once installed.
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.
The Windows Copilot switch in Privacy & Telemetry writes one policy,
TurnOffWindowsCopilot. On Windows 11 version 24H2 and later that policy does nothing, and the switch said it had been applied.What changes
TurnOffWindowsCopilotas deprecated. It turns off the Windows Copilot pane and its taskbar button, it is not for the newer Windows Copilot app, and it also keeps an upgrade from installing that app on a PC whose image had the pane. Windows 11 24H2 (build 26100) has the app and no pane. So on 24H2 and later, Apply wrote a value nothing reads, the switch read back as on, the status line counted it among the protections that are active, and the app went on working.PrivacyToggle.IsRetiredmarks a switch the Windows on this PC no longer reads.LoadToggleslists such a switch only while it is on, so it can still be turned off to clear the policy. There it is named "Disable Windows Copilot (no effect on this PC)", its description says so and points to Preinstalled Apps for removing the app, and the tab's "N of M privacy protections active" leaves it out of both counts. Off, it is not listed at all, so a profile imported there drops its choice for it the way it drops a key it does not know. That log line now says the choice is not listed on this PC.InstalledWindows.IsWindows11Version24H2OrLaterholds the boundary, next toIsWindows10.Tests
PrivacyServiceTests: the switch is offered with its new name and description on 19045, 22631, 26099, an unreadable build and no build. On 26100 and 26200 it is not listed while off, and every other key still is. On 26100 with the policy set it is listed, retired and on, with the no-effect wording, and turning it off removes the value, after which it is no longer listed.EverySwitch_WritesTheValuesItsKeyStandsFornow pins this switch's key, value and protected value too. It used to leave the switch out.EveryToggle_KeepsTheKeyProfilesNameItByandTheRealSwitches_FillEveryReachread over a key of the test's own instead of the machine's registry. Read from the machine, the Windows and the settings of the PC running the test would decide whether this switch is listed.PrivacyViewModelTests.ASwitchWindowsNoLongerReads_IsNotCountedAmongTheProtectionsActive: with a retired switch on, the status line counts 1 of 2. Turned off, it is still 1 of 2, with one pending change.InstalledWindowsTests: 26099 counts as before 24H2, 26100 and 26200 as 24H2 or later, and an unreadable build as earlier.Red checks
Each change below was put back on its own, and the named tests failed for that reason:
>for>=): the 26100 rows of the off test and ofWindows11Version24H2OrLater_IsEveryBuildFrom24H2sFirst, and the on test.ABuildThatCouldNotBeRead_CountsAsEarlierThan24H2_..., the key list, the write map andTheRealSwitches_FillEveryReach.FakePrivacynot copying the flag: the same test, so the fake really carries it.Unit suite twice, the format check, and all four projects built with no warnings.
The README's Privacy & Telemetry screenshot dates from 1.51.6 and already shows older names; it is retaken with the other screenshots.