From 294949a4318f70c92084c946755a7765cdec8c3f Mon Sep 17 00:00:00 2001 From: romanitho <96626929+Romanitho@users.noreply.github.com> Date: Mon, 31 Oct 2022 13:32:59 +0100 Subject: [PATCH] Fixed wrong variable --- Winget-AutoUpdate-Install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Winget-AutoUpdate-Install.ps1 b/Winget-AutoUpdate-Install.ps1 index cff06dd..4480275 100644 --- a/Winget-AutoUpdate-Install.ps1 +++ b/Winget-AutoUpdate-Install.ps1 @@ -257,7 +257,7 @@ function Install-WingetAutoUpdate { & reg add "HKCR\AppUserModelId\Windows.SystemToast.Winget.Notification" /v IconUri /t REG_EXPAND_SZ /d %SystemRoot%\system32\@WindowsUpdateToastIcon.png /f | Out-Null $WAUClass = "HKLM:\Software\Classes\WAU" $WAUClassRun = "Wscript.exe ""$WingetUpdatePath\Invisible.vbs"" ""C:\Windows\System32\schtasks.exe /run /tn Winget-AutoUpdate""" - New-Item "HKLM:\Software\Classes\$($ActionType)\shell\open\command" -Force -ErrorAction SilentlyContinue | Out-Null + New-Item $WAUClass -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath $WAUClass -Name 'URL Protocol' -Value '' -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath $WAUClass -Name '(default)' -Value "URL:$($ActionType)" -PropertyType String -Force -ErrorAction SilentlyContinue | Out-Null New-ItemProperty -LiteralPath $WAUClass -Name 'EditFlags' -Value '2162688' -PropertyType DWord -Force -ErrorAction SilentlyContinue | Out-Null