[GPO][MWB]Add policy to disable service mode (#37366)

* [MWB]Add policy to disable service mode

* Add restart note

* Tweak settings to disable setting

* Tweak infobars

* Policy should be machine only
This commit is contained in:
Jaime Bernardo
2025-02-12 18:49:26 +00:00
committed by GitHub
parent e0cb4018ab
commit 0c7a1dd316
13 changed files with 109 additions and 12 deletions

View File

@@ -363,7 +363,11 @@ private:
void update_state_from_settings(const PowerToysSettings::PowerToyValues& values)
{
const bool new_run_in_service_mode = values.get_bool_value(USE_SERVICE_PROPERTY_NAME).value_or(false);
bool new_run_in_service_mode = values.get_bool_value(USE_SERVICE_PROPERTY_NAME).value_or(false);
if (powertoys_gpo::getConfiguredMwbAllowServiceModeValue() == powertoys_gpo::gpo_rule_configured_disabled)
{
new_run_in_service_mode = false;
}
if (new_run_in_service_mode != run_in_service_mode)
{