From 909257386138f2d1ea6a36e0ce178ffeb5ea06b8 Mon Sep 17 00:00:00 2001 From: KnifMelti Date: Tue, 3 Jan 2023 05:29:13 +0100 Subject: [PATCH] Data instead of Value --- Winget-AutoUpdate/mods/_AppID-template.ps1 | 8 ++++---- Winget-AutoUpdate/mods/_Mods-Functions.ps1 | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Winget-AutoUpdate/mods/_AppID-template.ps1 b/Winget-AutoUpdate/mods/_AppID-template.ps1 index fa33216..f22124f 100644 --- a/Winget-AutoUpdate/mods/_AppID-template.ps1 +++ b/Winget-AutoUpdate/mods/_AppID-template.ps1 @@ -15,11 +15,11 @@ $Lnk = @("") #Registry _value_ (DWord/String) to add in existing registry Key. Example: #$AddKey = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Winget-AutoUpdate" #$AddValue = "WAU_BypassListForUsers" -#$AddTypeValue = "1" +#$AddTypeData = "1" #$AddType = "DWord" $AddKey = "" $AddValue = "" -$AddTypeValue = "" +$AddTypeData = "" $AddType = "" #Registry _value_ to delete in existing registry Key. Example: @@ -44,8 +44,8 @@ if ($App) { if ($Lnk) { Remove-ModsLnk $Lnk } -if ($AddKey -and $AddValue -and $AddTypeValue -and $AddType) { - Add-ModsReg $AddKey $AddValue $AddTypeValue $AddType +if ($AddKey -and $AddValue -and $AddTypeData -and $AddType) { + Add-ModsReg $AddKey $AddValue $AddTypeData $AddType } if ($DelKey -and $DelValue) { Remove-ModsReg $DelKey $DelValue diff --git a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 index 9c4978b..877bc93 100644 --- a/Winget-AutoUpdate/mods/_Mods-Functions.ps1 +++ b/Winget-AutoUpdate/mods/_Mods-Functions.ps1 @@ -136,9 +136,9 @@ function Remove-ModsLnk ($Lnk) { Return } -function Add-ModsReg ($AddKey, $AddValue, $AddTypeValue, $AddType) { +function Add-ModsReg ($AddKey, $AddValue, $AddTypeData, $AddType) { if (Test-Path "$AddKey") { - New-ItemProperty $AddKey -Name $AddValue -Value $AddTypeValue -PropertyType $AddType -Force | Out-Null + New-ItemProperty $AddKey -Name $AddValue -Value $AddTypeData -PropertyType $AddType -Force | Out-Null } Return }