@@ -22,6 +22,7 @@ Author: @rednek46
22
22
23
23
$SpotifyDirectory = " $env:APPDATA\Spotify"
24
24
$SpotifyExecutable = " $SpotifyDirectory\Spotify.exe"
25
+ $SpotifyApps = " $SpotifyDirectory\Apps"
25
26
26
27
Write-Host 'Stopping Spotify...'`n
27
28
Stop-Process -Name Spotify
71
72
Write-Output $_
72
73
Sleep
73
74
}
75
+ try {
76
+ $webClient.DownloadFile(
77
+ # Remote file URL
78
+ 'https://github.com/mrpond/BlockTheSpot/files/5767943/zlink.zip',
79
+ # Local file path
80
+ " $PWD\zlink.zip"
81
+ )
82
+ } catch {
83
+ Write-Output $_
84
+ Sleep
85
+ }
74
86
Expand-Archive -Force -LiteralPath " $PWD\chrome_elf.zip" -DestinationPath $PWD
75
87
Remove-Item -LiteralPath " $PWD\chrome_elf.zip"
88
+ Expand-Archive -Force -LiteralPath " $PWD\zlink.zip" -DestinationPath $PWD
89
+ Remove-Item -LiteralPath " $PWD\zlink.zip"
76
90
77
91
$spotifyInstalled = (Test-Path -LiteralPath $SpotifyExecutable)
78
92
if (-not $spotifyInstalled) {
@@ -110,8 +124,18 @@ if (!(test-path $SpotifyDirectory/chrome_elf.dll.bak)){
110
124
111
125
Write-Host 'Patching Spotify...'
112
126
$patchFiles = " $PWD\chrome_elf.dll" , " $PWD\config.ini"
127
+ $remup = " $PWD\zlink.spa"
113
128
Copy-Item -LiteralPath $patchFiles -Destination " $SpotifyDirectory"
114
129
130
+ $ch = Read-Host -Prompt " Optional - Remove Upgrade Button. (Y/N) "
131
+ if ($ch -eq 'y'){
132
+ move $SpotifyApps\zlink.spa $SpotifyApps\zlink.spa.bak > $null 2 >& 1
133
+ Copy-Item -LiteralPath $remup -Destination " $SpotifyApps"
134
+ } else{
135
+ Write-Host @ '
136
+ Won't remove Upgrade Button.
137
+ '@ `n
138
+ }
115
139
$tempDirectory = $PWD
116
140
Pop-Location
117
141
0 commit comments