- Backup and restore for Spotify.exe
 - Removing legacy code
This commit is contained in:
amd64fox
2022-05-16 17:05:08 +03:00
parent 99caa61d4f
commit 83d7972a98
3 changed files with 11 additions and 17 deletions
+3 -1
View File
@@ -798,10 +798,12 @@ $update_test_exe = Test-Path -Path $spotifyExecutable
if ($block_update) {
if ($update_test_exe) {
$exe = "$env:APPDATA\Spotify\spotify.exe"
$exe = "$env:APPDATA\Spotify\Spotify.exe"
$exe_bak = "$env:APPDATA\Spotify\Spotify.bak"
$ANSI = [Text.Encoding]::GetEncoding(1251)
$old = [IO.File]::ReadAllText($exe, $ANSI)
if ($old -match "(?<=wg:\/\/desktop-update\/.)2(\/update)") {
copy-Item $exe $exe_bak
$new = $old -replace "(?<=wg:\/\/desktop-update\/.)2(\/update)", '7/update'
[IO.File]::WriteAllText($exe, $new, $ANSI)
}