NotificationLevel done
parent
4e660e3546
commit
96b1900b31
|
@ -90,5 +90,28 @@
|
|||
<text id="ModsPath" valueName="WAU_ModsPath" required="true" />
|
||||
</elements>
|
||||
</policy>
|
||||
<policy name="NotificationLevel" class="Machine" displayName="$(string.NotificationLevel)" explainText="$(string.NotificationLevel_Explain)" key="Software\Policies\Romanitho\Winget-AutoUpdate" presentation="$(presentation.NotificationLevel)">
|
||||
<parentCategory ref="WAU"/>
|
||||
<supportedOn ref="WAU:SUPPORTED_WAU_1_15_3"/>
|
||||
<elements>
|
||||
<enum id="NotificationLevel" valueName="WAU_NotificationLevel">
|
||||
<item displayName="$(string.NotificationLevel_Full)">
|
||||
<value>
|
||||
<string>Full</string>
|
||||
</value>
|
||||
</item>
|
||||
<item displayName="$(string.NotificationLevel_SuccessOnly)">
|
||||
<value>
|
||||
<string>SuccessOnly</string>
|
||||
</value>
|
||||
</item>
|
||||
<item displayName="$(string.NotificationLevel_None)">
|
||||
<value>
|
||||
<string>None</string>
|
||||
</value>
|
||||
</item>
|
||||
</enum>
|
||||
</elements>
|
||||
</policy>
|
||||
</policies>
|
||||
</policyDefinitions>
|
|
@ -22,6 +22,12 @@
|
|||
<string id="ListPath_Explain">If this policy is enabled, you can set a (URL/UNC/Local) Path to external lists other than the default. If this policy is disabled or not configured, the default ListPath is used.</string>
|
||||
<string id="ModsPath">Get Mods from external Path (URL/UNC/Local)</string>
|
||||
<string id="ModsPath_Explain">If this policy is enabled, you can set a (URL/UNC/Local) Path to external mods other than the default. If this policy is disabled or not configured, the default ModsPath is used.</string>
|
||||
<string id="NotificationLevel">Notification Level</string>
|
||||
<string id="NotificationLevel_Explain">If this policy is enabled, you can configure Notification Level: Full (Default, displays all notifications), SuccessOnly (Only displays notifications for success) or None (Does not display any notification).
|
||||
If this policy is not configured or disabled, the default displays all notifications.</string>
|
||||
<string id="NotificationLevel_Full">1. Full (Default, displays all notifications)</string>
|
||||
<string id="NotificationLevel_SuccessOnly">2. SuccessOnly (Only displays notifications for success)</string>
|
||||
<string id="NotificationLevel_None">3. None (Does not display any notification)</string>
|
||||
</stringTable>
|
||||
<presentationTable>
|
||||
<presentation id="ListPath">
|
||||
|
@ -34,6 +40,9 @@
|
|||
<label>(URL/UNC/Local) Path:</label>
|
||||
</textBox>
|
||||
</presentation>
|
||||
<presentation id="NotificationLevel">
|
||||
<dropdownList refId="NotificationLevel"/>
|
||||
</presentation>
|
||||
</presentationTable>
|
||||
</resources>
|
||||
</policyDefinitionResources>
|
||||
|
|
|
@ -79,6 +79,13 @@ if ($IsSystem) {
|
|||
elseif ($null -eq $WAUPolicies.WAU_ModsPath) {
|
||||
Remove-ItemProperty $regPath"\" -Name WAU_ModsPath -Force -ErrorAction SilentlyContinue | Out-Null
|
||||
}
|
||||
|
||||
if ($null -ne $WAUPolicies.WAU_NotificationLevel -and ($WAUPolicies.WAU_NotificationLevel -ne $WAUConfig.WAU_NotificationLevel)) {
|
||||
New-ItemProperty $regPath -Name WAU_NotificationLevel -Value $WAUPolicies.WAU_NotificationLevel -Force | Out-Null
|
||||
}
|
||||
elseif ($null -eq $WAUPolicies.WAU_NotificationLevel) {
|
||||
New-ItemProperty $regPath -Name WAU_NotificationLevel -Value "Full" -Force | Out-Null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue