Update Update-WAU.ps1

pull/31/head
Romain 2022-03-22 18:19:30 +01:00 committed by GitHub
parent 9feb0c982a
commit 5dceecb80c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -24,8 +24,11 @@ function Update-WAU ($VersionToUpdate){
Expand-Archive -Path $ZipFile -DestinationPath $location -Force
Get-ChildItem -Path $location -Recurse | Unblock-File
Write-Log "Unzip finished" "Green"
$TempPath = (Resolve-Path "$location\*\Winget-AutoUpdate\").Path
Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Exclude "icons" -Recurse -Force
$TempPath = (Resolve-Path "$location\*\Winget-AutoUpdate\")[0].Path
$TempPath = (Resolve-Path "$location\*\Winget-AutoUpdate\")[0].Path
if ($TempPath){
Copy-Item -Path "$TempPath\*" -Destination "$WorkingDir\" -Exclude "icons" -Recurse -Force
}
#Remove update zip file
Write-Log "Cleaning temp files"