-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix: Allow system administrators to suppress telemetry by policy #1204
Conversation
/// <summary> | ||
/// Whether or not telemetry toggle button is enabled in the settings. | ||
/// </summary> | ||
bool IsTelemetryAllowed { get; set; } | ||
bool HasUserOptedIntoTelemetry { get; set; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a rename to better distinguish which level of enabling we are setting
@@ -55,9 +55,9 @@ private void btnExit_Click(object sender, RoutedEventArgs e) | |||
DialogResult = ckbxAgreeToHelp.IsChecked ?? false; | |||
|
|||
if (DialogResult) | |||
TelemetryController.EnableTelemetry(); | |||
TelemetryController.OptIntoTelemetry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a rename to better distinguish which level of enabling we are setting
else | ||
TelemetryController.DisableTelemetry(); | ||
TelemetryController.OptOutOfTelemetry(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a rename to better distinguish which level of enabling we are setting
@@ -631,7 +631,7 @@ public static ConfigurationModel GetDefaultConfigurationModel(FixedConfigSetting | |||
FontSize = FontSize.Standard, | |||
HighlighterMode = HighlighterMode.HighlighterBeakerTooltip, | |||
ShowAncestry = true, | |||
EnableTelemetry = true, | |||
EnableTelemetry = false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't strictly necessary but better reflects what the default value should be
Details
Create a registry-based policy to disable telemetry from a computer. The suppression is system-wide and persists across uninstall/reinstall. The suppression is added by creating the following registry value:
Key: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Accessibility Insights for Windows
Value (DWORD): DisableTelemetry = 1
In terms of a reg file, it looks like this:
If this value exists and is set to 1, then the initial telemetry prompt is skipped. Inside the settings dialog, the standard telemetry block is also changed, as shown here:
The key is read when the app starts up, and changes to the key will be ignored until after the app is restarted.
Motivation
Addresses #1182
Context
I also walked through this extended scenario:
This works because the ShowTelemetryDialog flag defaults to true, then never gets set to false. When the registry override is removed, we display the telemetry dialog, as expected.
Pull request checklist