From 99e68b4db1c45f9393da0c43bd2ffd09afc858a4 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 11 Nov 2023 17:25:29 +0100 Subject: [PATCH] simplify and ignore error on reinstallation --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3194000..f5d181f 100644 --- a/README.md +++ b/README.md @@ -12,14 +12,13 @@ Helper for sharing video captured by NVidia Shadowplay in Discord. Copy and paste this snippet into the windows command prompt: - ```bash + ```batch PowerShell -Command "" ^ "$releases = 'https://git.mylloon.fr/api/v1/repos/Anri/dsr/releases/latest';" ^ "$link = (Invoke-WebRequest $releases | ConvertFrom-Json)[0].assets.browser_download_url;" ^ - "$archive = 'dsr.zip';" ^ - "$outfile = Join-Path -Path $env:TEMP -ChildPath $archive;" ^ - "Invoke-WebRequest -Uri $link -OutFile $outfile;" ^ - "cd $env:TEMP;" ^ + "$archive = '%TEMP%\dsr.zip';" ^ + "Invoke-WebRequest -Uri $link -OutFile $archive;" ^ + "Remove-Item '%LOCALAPPDATA%\DSR' -Recurse -ErrorAction SilentlyContinue;" ^ "Expand-Archive -Path $archive -DestinationPath '%LOCALAPPDATA%\DSR' -Force;" ^ "Move-Item -Path '%LOCALAPPDATA%\DSR\dsr-win32-x64\*' -Destination '%LOCALAPPDATA%\DSR' -Force;" ^ "Remove-Item '%LOCALAPPDATA%\DSR\dsr-win32-x64';" ^