clean DSR if already exists

This commit is contained in:
Mylloon 2023-11-11 17:22:52 +01:00
parent fb94de4c76
commit 02657c40d3
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -203,6 +203,7 @@ PowerShell -Command "" ^
"$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url;" ^ "$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url;" ^
"$archive = '%TEMP%\dsr.zip';" ^ "$archive = '%TEMP%\dsr.zip';" ^
"Invoke-WebRequest -Uri $link -OutFile $archive;" ^ "Invoke-WebRequest -Uri $link -OutFile $archive;" ^
"Remove-Item '%LOCALAPPDATA%\DSR' -Recurse -ErrorAction SilentlyContinue;" ^
"Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\DSR' -Force;" ^ "Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\DSR' -Force;" ^
"Move-Item -Path '%LOCALAPPDATA%\DSR\dsr-win32-x64\*' -Destination '%LOCALAPPDATA%\DSR' -Force;" ^ "Move-Item -Path '%LOCALAPPDATA%\DSR\dsr-win32-x64\*' -Destination '%LOCALAPPDATA%\DSR' -Force;" ^
"Remove-Item '%LOCALAPPDATA%\DSR\dsr-win32-x64';" ^ "Remove-Item '%LOCALAPPDATA%\DSR\dsr-win32-x64';" ^