File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Sources/Winget-AutoUpdate Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ Add-Type -AssemblyName PresentationFramework
2727
2828# Constants of most used paths and arguments
2929$Script :WAU_REGISTRY_PATH = " HKLM:\SOFTWARE\Romanitho\Winget-AutoUpdate"
30+ $Script :WAU_POLICIES_PATH = " HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate"
3031$Script :CONHOST_EXE = " ${env: SystemRoot} \System32\conhost.exe"
3132$Script :POWERSHELL_ARGS = " --headless powershell.exe -NoProfile -ExecutionPolicy Bypass -File"
3233$Script :DESKTOP_RUN_WAU = " ${env: Public} \Desktop\Run WAU.lnk"
@@ -445,7 +446,7 @@ function Update-WAUGUIFromConfig {
445446 # Get GPO policies from registry
446447 $updatedPolicies = $null
447448 try {
448- $updatedPolicies = Get-ItemProperty - Path " HKLM:\SOFTWARE\Policies\Romanitho\Winget-AutoUpdate " - ErrorAction SilentlyContinue
449+ $updatedPolicies = Get-ItemProperty - Path $ Script :WAU_POLICIES_PATH - ErrorAction SilentlyContinue
449450 }
450451 catch {
451452 # GPO registry key doesn't exist or can't be read
You can’t perform that action at this time.
0 commit comments