mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Dev]Remove prepared code for "Auto update" policy (#31064)
* Update PowerToys.admx * Update PowerToys.adml * Update UpdateUtils.cpp * Update gpo.h * Update ReportGPOValues.cpp
This commit is contained in:
@@ -65,7 +65,6 @@ namespace powertoys_gpo {
|
|||||||
const std::wstring POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD = L"AutomaticUpdateDownloadDisabled";
|
const std::wstring POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD = L"AutomaticUpdateDownloadDisabled";
|
||||||
const std::wstring POLICY_SUSPEND_NEW_UPDATE_TOAST = L"SuspendNewUpdateAvailableToast";
|
const std::wstring POLICY_SUSPEND_NEW_UPDATE_TOAST = L"SuspendNewUpdateAvailableToast";
|
||||||
const std::wstring POLICY_DISABLE_NEW_UPDATE_TOAST = L"DisableNewUpdateAvailableToast";
|
const std::wstring POLICY_DISABLE_NEW_UPDATE_TOAST = L"DisableNewUpdateAvailableToast";
|
||||||
const std::wstring POLICY_DISABLE_PERIODIC_UPDATE_CHECK = L"PeriodicUpdateCheckDisabled";
|
|
||||||
const std::wstring POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES = L"DoNotShowWhatsNewAfterUpdates";
|
const std::wstring POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES = L"DoNotShowWhatsNewAfterUpdates";
|
||||||
|
|
||||||
// The registry value names for other PowerToys policies.
|
// The registry value names for other PowerToys policies.
|
||||||
@@ -412,11 +411,6 @@ namespace powertoys_gpo {
|
|||||||
return getConfiguredValue(POLICY_DISABLE_NEW_UPDATE_TOAST);
|
return getConfiguredValue(POLICY_DISABLE_NEW_UPDATE_TOAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline gpo_rule_configured_t getDisablePeriodicUpdateCheckValue()
|
|
||||||
{
|
|
||||||
return getConfiguredValue(POLICY_DISABLE_PERIODIC_UPDATE_CHECK);
|
|
||||||
}
|
|
||||||
|
|
||||||
inline gpo_rule_configured_t getDisableShowWhatsNewAfterUpdatesValue()
|
inline gpo_rule_configured_t getDisableShowWhatsNewAfterUpdatesValue()
|
||||||
{
|
{
|
||||||
return getConfiguredValue(POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES);
|
return getConfiguredValue(POLICY_DISABLE_SHOW_WHATS_NEW_AFTER_UPDATES);
|
||||||
|
|||||||
@@ -451,18 +451,6 @@
|
|||||||
<decimal value="0" />
|
<decimal value="0" />
|
||||||
</disabledValue>
|
</disabledValue>
|
||||||
</policy>
|
</policy>
|
||||||
<!-- This policy is implemented for later usage (PT v1.0 and later) and therefore inactive. (To make it working please update `src/runner/UpdateUtils.cpp`)
|
|
||||||
<policy name="DisablePeriodicUpdateCheck" class="Both" displayName="$(string.DisablePeriodicUpdateCheck)" explainText="$(string.DisablePeriodicUpdateCheckDescription)" key="Software\Policies\PowerToys" valueName="PeriodicUpdateCheckDisabled">
|
|
||||||
<parentCategory ref="InstallerUpdates" />
|
|
||||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_68_0" />
|
|
||||||
<enabledValue>
|
|
||||||
<decimal value="1" />
|
|
||||||
</enabledValue>
|
|
||||||
<disabledValue>
|
|
||||||
<decimal value="0" />
|
|
||||||
</disabledValue>
|
|
||||||
</policy>
|
|
||||||
-->
|
|
||||||
<policy name="DoNotShowWhatsNewAfterUpdates" class="Both" displayName="$(string.DoNotShowWhatsNewAfterUpdates)" explainText="$(string.DoNotShowWhatsNewAfterUpdatesDescription)" key="Software\Policies\PowerToys" valueName="DoNotShowWhatsNewAfterUpdates">
|
<policy name="DoNotShowWhatsNewAfterUpdates" class="Both" displayName="$(string.DoNotShowWhatsNewAfterUpdates)" explainText="$(string.DoNotShowWhatsNewAfterUpdatesDescription)" key="Software\Policies\PowerToys" valueName="DoNotShowWhatsNewAfterUpdates">
|
||||||
<parentCategory ref="InstallerUpdates" />
|
<parentCategory ref="InstallerUpdates" />
|
||||||
<supportedOn ref="SUPPORTED_POWERTOYS_0_78_0" />
|
<supportedOn ref="SUPPORTED_POWERTOYS_0_78_0" />
|
||||||
|
|||||||
@@ -80,12 +80,6 @@ This policy has no effect if the update notification is disabled by the policy "
|
|||||||
If enabled, the notification is disabled.
|
If enabled, the notification is disabled.
|
||||||
|
|
||||||
If disabled or not configured, the user can control if the notification is shown or not.
|
If disabled or not configured, the user can control if the notification is shown or not.
|
||||||
</string>
|
|
||||||
<string id="DisablePeriodicUpdateCheckDescription">This policy allows you to disable automatic update checks running in the background. (The manual check in PT Settings is not affected by this policy.)
|
|
||||||
|
|
||||||
If enabled, the automatic update checks are disabled.
|
|
||||||
|
|
||||||
If disabled or not configured, the automatic update checks are enabled.
|
|
||||||
</string>
|
</string>
|
||||||
<string id="DoNotShowWhatsNewAfterUpdatesDescription">This policy allows you to configure if the window with the release notes is shown after updates.
|
<string id="DoNotShowWhatsNewAfterUpdatesDescription">This policy allows you to configure if the window with the release notes is shown after updates.
|
||||||
|
|
||||||
@@ -165,7 +159,6 @@ Note: Changes require a restart of PowerToys Run.
|
|||||||
<string id="DoNotShowWhatsNewAfterUpdates">Do not show the release notes after updates</string>
|
<string id="DoNotShowWhatsNewAfterUpdates">Do not show the release notes after updates</string>
|
||||||
<string id="SuspendNewUpdateToast">Suspend Action Center notification for new updates</string>
|
<string id="SuspendNewUpdateToast">Suspend Action Center notification for new updates</string>
|
||||||
<string id="DisableNewUpdateToast">Disable Action Center notification for new updates</string>
|
<string id="DisableNewUpdateToast">Disable Action Center notification for new updates</string>
|
||||||
<string id="DisablePeriodicUpdateCheck">Disable automatic update checks</string>
|
|
||||||
<string id="AllowExperimentation">Allow Experimentation</string>
|
<string id="AllowExperimentation">Allow Experimentation</string>
|
||||||
<string id="PowerToysRunAllPluginsEnabledState">Configure enabled state for all plugins</string>
|
<string id="PowerToysRunAllPluginsEnabledState">Configure enabled state for all plugins</string>
|
||||||
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
|
<string id="PowerToysRunIndividualPluginEnabledState">Configure enabled state for individual plugins</string>
|
||||||
|
|||||||
@@ -200,14 +200,6 @@ void ProcessNewVersionInfo(const github_version_info& version_info,
|
|||||||
|
|
||||||
void PeriodicUpdateWorker()
|
void PeriodicUpdateWorker()
|
||||||
{
|
{
|
||||||
// Check if periodic update check is disabled by GPO.
|
|
||||||
// This policy code is implemented but not active. It is for later usage in PT version after 1.0 release.
|
|
||||||
//if (powertoys_gpo::getDisablePeriodicUpdateCheckValue() == powertoys_gpo::gpo_rule_configured_enabled)
|
|
||||||
//{
|
|
||||||
// Logger::info(L"Initialization of periodic update checks stopped. Periodic update checks are disabled by GPO.");
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
auto state = UpdateState::read();
|
auto state = UpdateState::read();
|
||||||
|
|||||||
@@ -62,9 +62,7 @@ void ReportGPOValues(const std::filesystem::path& tmpDir)
|
|||||||
report << "getConfiguredVideoConferenceMuteEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue()) << std::endl;
|
report << "getConfiguredVideoConferenceMuteEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue()) << std::endl;
|
||||||
report << "getDisableAutomaticUpdateDownloadValue: " << gpo_rule_configured_to_string(powertoys_gpo::getDisableAutomaticUpdateDownloadValue()) << std::endl;
|
report << "getDisableAutomaticUpdateDownloadValue: " << gpo_rule_configured_to_string(powertoys_gpo::getDisableAutomaticUpdateDownloadValue()) << std::endl;
|
||||||
report << "getSuspendNewUpdateToastValue: " << gpo_rule_configured_to_string(powertoys_gpo::getSuspendNewUpdateToastValue()) << std::endl;
|
report << "getSuspendNewUpdateToastValue: " << gpo_rule_configured_to_string(powertoys_gpo::getSuspendNewUpdateToastValue()) << std::endl;
|
||||||
report << "getDisablePeriodicUpdateCheckValue: " << gpo_rule_configured_to_string(powertoys_gpo::getDisablePeriodicUpdateCheckValue()) << std::endl;
|
|
||||||
report << "getAllowExperimentationValue: " << gpo_rule_configured_to_string(powertoys_gpo::getAllowExperimentationValue()) << std::endl;
|
report << "getAllowExperimentationValue: " << gpo_rule_configured_to_string(powertoys_gpo::getAllowExperimentationValue()) << std::endl;
|
||||||
report << "getConfiguredQoiPreviewEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiPreviewEnabledValue()) << std::endl;
|
report << "getConfiguredQoiPreviewEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiPreviewEnabledValue()) << std::endl;
|
||||||
report << "getConfiguredQoiThumbnailsEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue()) << std::endl;
|
report << "getConfiguredQoiThumbnailsEnabledValue: " << gpo_rule_configured_to_string(powertoys_gpo::getConfiguredQoiThumbnailsEnabledValue()) << std::endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user