[GPO]Add policy to define the run at startup setting (#37385)

* [GPO]Add policy to define the run at startup setting

* Use message for single setting managed by policy instead
This commit is contained in:
Jaime Bernardo
2025-02-12 18:49:49 +00:00
committed by GitHub
parent 0c7a1dd316
commit 58d34087ee
10 changed files with 88 additions and 4 deletions

View File

@@ -73,6 +73,7 @@ namespace powertoys_gpo {
// The registry value names for other PowerToys policies.
const std::wstring POLICY_ALLOW_EXPERIMENTATION = L"AllowExperimentation";
const std::wstring POLICY_ALLOW_DATA_DIAGNOSTICS = L"AllowDataDiagnostics";
const std::wstring POLICY_CONFIGURE_RUN_AT_STARTUP = L"ConfigureRunAtStartup";
const std::wstring POLICY_CONFIGURE_ENABLED_POWER_LAUNCHER_ALL_PLUGINS = L"PowerLauncherAllPluginsEnabledState";
const std::wstring POLICY_ALLOW_ADVANCED_PASTE_ONLINE_AI_MODELS = L"AllowPowerToysAdvancedPasteOnlineAIModels";
const std::wstring POLICY_MWB_CLIPBOARD_SHARING_ENABLED = L"MwbClipboardSharingEnabled";
@@ -494,6 +495,11 @@ namespace powertoys_gpo {
return getConfiguredValue(POLICY_ALLOW_DATA_DIAGNOSTICS);
}
inline gpo_rule_configured_t getConfiguredRunAtStartupValue()
{
return getConfiguredValue(POLICY_CONFIGURE_RUN_AT_STARTUP);
}
inline gpo_rule_configured_t getRunPluginEnabledValue(std::string pluginID)
{
if (pluginID == "" || pluginID == " ")