From 94b554e04cab92de749fcd6671752437c5128c7e Mon Sep 17 00:00:00 2001 From: Romain <96626929+Romanitho@users.noreply.github.com> Date: Mon, 23 May 2022 18:08:39 +0200 Subject: [PATCH] improved uninstall feature --- Winget-AutoUpdate/WAU-Uninstall.bat | 2 -- Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 Winget-AutoUpdate/WAU-Uninstall.bat diff --git a/Winget-AutoUpdate/WAU-Uninstall.bat b/Winget-AutoUpdate/WAU-Uninstall.bat deleted file mode 100644 index 5bfe301..0000000 --- a/Winget-AutoUpdate/WAU-Uninstall.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -powershell -Command "Start-Process powershell.exe -Argument '-noprofile -executionpolicy bypass -file """%~dp0WAU-Uninstall.ps1""" '" -Verb RunAs \ No newline at end of file diff --git a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 index b471318..710c5e6 100644 --- a/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 +++ b/Winget-AutoUpdate/functions/Invoke-PostUpdateActions.ps1 @@ -15,8 +15,8 @@ function Invoke-PostUpdateActions { New-ItemProperty $regPath -Name Publisher -Value "Romanitho" -Force New-ItemProperty $regPath -Name URLInfoAbout -Value "https://github.com/Romanitho/Winget-AutoUpdate" -Force New-ItemProperty $regPath -Name InstallLocation -Value $WorkingDir -Force - New-ItemProperty $regPath -Name UninstallString -Value "$WorkingDir\WAU-Uninstall.bat" -Force - New-ItemProperty $regPath -Name QuietUninstallString -Value "$WorkingDir\WAU-Uninstall.bat" -Force + New-ItemProperty $regPath -Name UninstallString -Value "powershell.exe -noprofile -executionpolicy bypass -file `"$WingetUpdatePath\WAU-Uninstall.ps1`"" -Force + New-ItemProperty $regPath -Name QuietUninstallString -Value "powershell.exe -noprofile -executionpolicy bypass -file `"$WingetUpdatePath\WAU-Uninstall.ps1`"" -Force New-ItemProperty $regPath -Name WAU_UpdatePrerelease -Value 0 -PropertyType DWord -Force #log