Clean before install (in case of previous version)
Cleaning install folder before install (in case a previous install was present)pull/90/head
parent
b43b2d9aa7
commit
9cfa54b2de
|
@ -164,10 +164,13 @@ function Install-WingetAutoUpdate{
|
|||
Write-Host "`nInstalling WAU..." -ForegroundColor Yellow
|
||||
|
||||
try{
|
||||
#Copy files to location
|
||||
#Copy files to location (and clean old install)
|
||||
if (!(Test-Path $WingetUpdatePath)){
|
||||
New-Item -ItemType Directory -Force -Path $WingetUpdatePath | Out-Null
|
||||
}
|
||||
else {
|
||||
Remove-Item -Path "$WingetUpdatePath\*" -Recurse -Force
|
||||
}
|
||||
Copy-Item -Path "$PSScriptRoot\Winget-AutoUpdate\*" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue
|
||||
|
||||
#White List or Black List apps
|
||||
|
|
Loading…
Reference in New Issue