force close dsr before updating (#18)

This commit is contained in:
Mylloon 2024-07-11 14:33:56 +02:00
parent 80dca39b8c
commit 8fb8f24625
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -15,6 +15,9 @@ $archive = "$env:TEMP\dsr.zip"
Invoke-WebRequest -Uri $link -OutFile $archive Invoke-WebRequest -Uri $link -OutFile $archive
Remove-Item "$path" -Recurse -ErrorAction SilentlyContinue Remove-Item "$path" -Recurse -ErrorAction SilentlyContinue
# Close running DSR
Stop-Process -Name "DSR" -Force
# Installation # Installation
Expand-Archive -Path $archive -DestinationPath "$path" -Force Expand-Archive -Path $archive -DestinationPath "$path" -Force
Move-Item -Path "$path\dsr-win32-x64\*" -Destination "$path" -Force Move-Item -Path "$path\dsr-win32-x64\*" -Destination "$path" -Force