[GPO; Enterprise] Updater policies (#24221)

* Implement GPO

* Add GPOs in updater

* Rename policy

* fix

* fix

* Update GPOWrapper.h

Added relative path to Generated Files folder for GPOWrapper.g.h

* fix and inactivate PeriodicUpdateCheck gpo

* Docs

* GPO name change

* Templates

* Templates: Text changes

* Templates: Text changes

* Templates: Text changes

* docs: spell fix

* settings ui

* fixes

* fixes

* fix gpo description

* EOF fix

* Fix include in UpdateUtils.cpp and remove build workaround

* UI improvements

* spell fixes

* code improvements

* Update README.md

* Update PowerToys.adml

* Update src/gpo/assets/PowerToys.admx

* Remove forbidden pattern
This commit is contained in:
Heiko
2023-02-24 15:35:33 +01:00
committed by GitHub
parent 0524a4bddd
commit 6750442d91
11 changed files with 201 additions and 15 deletions

View File

@@ -120,6 +120,10 @@ namespace winrt::PowerToys::GPOWrapper::implementation
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getConfiguredVideoConferenceMuteEnabledValue());
}
GpoRuleConfigured GPOWrapper::GetDisableAutomaticUpdateDownloadValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getDisableAutomaticUpdateDownloadValue());
}
GpoRuleConfigured GPOWrapper::GetAllowExperimentationValue()
{
return static_cast<GpoRuleConfigured>(powertoys_gpo::getAllowExperimentationValue());

View File

@@ -36,6 +36,7 @@ namespace winrt::PowerToys::GPOWrapper::implementation
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetDisableAutomaticUpdateDownloadValue();
static GpoRuleConfigured GetAllowExperimentationValue();
};
}

View File

@@ -40,6 +40,7 @@ namespace PowerToys
static GpoRuleConfigured GetConfiguredTextExtractorEnabledValue();
static GpoRuleConfigured GetConfiguredPastePlainEnabledValue();
static GpoRuleConfigured GetConfiguredVideoConferenceMuteEnabledValue();
static GpoRuleConfigured GetDisableAutomaticUpdateDownloadValue();
static GpoRuleConfigured GetAllowExperimentationValue();
}
}

View File

@@ -48,6 +48,13 @@ namespace powertoys_gpo {
const std::wstring POLICY_CONFIGURE_ENABLED_TEXT_EXTRACTOR = L"ConfigureEnabledUtilityTextExtractor";
const std::wstring POLICY_CONFIGURE_ENABLED_PASTE_PLAIN = L"ConfigureEnabledUtilityPastePlain";
const std::wstring POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE = L"ConfigureEnabledUtilityVideoConferenceMute";
// The registry value names for PowerToys installer and update policies.
const std::wstring POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD = L"AutomaticUpdateDownloadDisabled";
const std::wstring POLICY_SUSPEND_NEW_UPDATE_TOAST = L"SuspendNewUpdateAvailableToast";
const std::wstring POLICY_DISABLE_PERIODIC_UPDATE_CHECK = L"PeriodicUpdateCheckDisabled";
// The registry value names for other PowerToys policies.
const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation";
inline gpo_rule_configured_t getConfiguredValue(const std::wstring& registry_value_name)
@@ -248,6 +255,21 @@ namespace powertoys_gpo {
return getConfiguredValue(POLICY_CONFIGURE_ENABLED_VIDEO_CONFERENCE_MUTE);
}
inline gpo_rule_configured_t getDisableAutomaticUpdateDownloadValue()
{
return getConfiguredValue(POLICY_DISABLE_AUTOMATIC_UPDATE_DOWNLOAD);
}
inline gpo_rule_configured_t getSuspendNewUpdateToastValue()
{
return getConfiguredValue(POLICY_SUSPEND_NEW_UPDATE_TOAST);
}
inline gpo_rule_configured_t getDisablePeriodicUpdateCheckValue()
{
return getConfiguredValue(POLICY_DISABLE_PERIODIC_UPDATE_CHECK);
}
inline gpo_rule_configured_t getAllowExperimentationValue()
{
return getConfiguredValue(POLICY_ALLOW_EXPERIMENTATION);