Edit registry
parent
66657dc4b5
commit
0964f1a48c
|
@ -14,7 +14,7 @@ Daily update settings from policies
|
|||
$ActivateGPOManagement = Get-ItemPropertyValue "HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate" -Name "WAU_ActivateGPOManagement" -ErrorAction SilentlyContinue
|
||||
if ($ActivateGPOManagement -eq 1) {
|
||||
#Add (or update) tag to activate WAU-Policies Management
|
||||
New-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" -Name WAU_RunGPOManagement -Value 1 -Force | Out-Null
|
||||
New-ItemProperty "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate" -Name WAU_RunGPOManagement -Value 1 -Force | Out-Null
|
||||
}
|
||||
|
||||
#Get WAU settings
|
||||
|
@ -32,7 +32,7 @@ if ($WAUConfig.WAU_RunGPOManagement -eq 1) {
|
|||
Add-Content -Path $GPOLogFile -Value "GPO Management Enabled. Policies updated."
|
||||
}
|
||||
else {
|
||||
New-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" -Name WAU_RunGPOManagement -Value 0 -Force | Out-Null
|
||||
New-ItemProperty "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate" -Name WAU_RunGPOManagement -Value 0 -Force | Out-Null
|
||||
$WAUConfig.WAU_RunGPOManagement = 0
|
||||
Add-Content -Path $GPOLogFile -Value "GPO Management Disabled. Policies removed."
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#Send Notify Script
|
||||
|
||||
#get xml notif config
|
||||
$WAUinstalledPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate\" -Name InstallLocation
|
||||
$WAUinstalledPath = Get-ItemPropertyValue -Path "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate\" -Name InstallLocation
|
||||
[xml]$NotifConf = Get-Content "$WAUinstalledPath\config\notif.xml" -Encoding UTF8 -ErrorAction SilentlyContinue
|
||||
if (!($NotifConf)) {
|
||||
break
|
||||
|
|
|
@ -35,7 +35,7 @@ $AllVersions = $False
|
|||
$Lnk = @("")
|
||||
|
||||
#Registry _value_ (DWord/String) to add in existing registry Key (Key created if not existing). Example:
|
||||
#$AddKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
|
||||
#$AddKey = "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate"
|
||||
#$AddValue = "WAU_BypassListForUsers"
|
||||
#$AddTypeData = "1"
|
||||
#$AddType = "DWord"
|
||||
|
@ -46,7 +46,7 @@ $AddType = ""
|
|||
|
||||
#Registry _value_ to delete in existing registry Key.
|
||||
#Value can be omitted for deleting entire Key!. Example:
|
||||
#$DelKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate"
|
||||
#$DelKey = "HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate"
|
||||
#$DelValue = "WAU_BypassListForUsers"
|
||||
$DelKey = ""
|
||||
$DelValue = ""
|
||||
|
|
Loading…
Reference in New Issue