Merge pull request #90 from Romanitho/minor-changes
Clean before install (in case of previous version)pull/92/head
commit
99eebc0819
|
@ -164,10 +164,13 @@ function Install-WingetAutoUpdate{
|
||||||
Write-Host "`nInstalling WAU..." -ForegroundColor Yellow
|
Write-Host "`nInstalling WAU..." -ForegroundColor Yellow
|
||||||
|
|
||||||
try{
|
try{
|
||||||
#Copy files to location
|
#Copy files to location (and clean old install)
|
||||||
if (!(Test-Path $WingetUpdatePath)){
|
if (!(Test-Path $WingetUpdatePath)){
|
||||||
New-Item -ItemType Directory -Force -Path $WingetUpdatePath | Out-Null
|
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
|
Copy-Item -Path "$PSScriptRoot\Winget-AutoUpdate\*" -Destination $WingetUpdatePath -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
#White List or Black List apps
|
#White List or Black List apps
|
||||||
|
|
Loading…
Reference in New Issue