{ "version": "1.3.12.2781.g1dd5c2566d12", "description": "A digital music service that gives you access to millions of songs.", "homepage": "https://www.spotify.com/", "license": { "identifier": "Freeware", "url": "https://www.spotify.com/legal/end-user-agreement/" }, "architecture": { "64bit": { "url": "https://download.scdn.co/SpotifyFullSetupX64.exe", "hash": "0f206d72c93d3758c181293e81be27b9d5069e11fe24f47df1620c09c889b10a" }, "arm64": { "url": "https://download.scdn.co/SpotifyFullSetupARM64.exe", "hash": "ff4a47cc9f5135fb17d8a0723ea32ee7b713e2b4b4d65daec211c5523efbc609" } }, "installer": { "script": [ "Start-Process -Wait \"$dir\\$fname\" -ArgumentList '/extract', \"`\"$dir`\"\"", "Remove-Item \"$dir\\$fname\", \"$dir\\SpotifyMigrator.exe\" -ErrorAction SilentlyContinue", "", "## Steps to block the built-in autoupdater ##", " $updateFile = \"$env:LOCALAPPDATA\\Spotify\\Update\"", "# Delete any remnant file or directory called Update (including modify-protected), unless it is readonly or hidden", " Remove-Item -Path \"$updateFile\" -Recurse -ErrorAction SilentlyContinue | Out-Null", "# Delete any remnant file or directory called Update (including readonly), unless it is modify-protected", " Remove-Item -Path \"$updateFile\" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null", "# Exit if there already exists an autoupdate-blocking file called Update", " if (Test-Path -Path \"$updateFile\") { return }", "# Create a file called Update", " New-Item -Path \"$updateFile\" -ItemType File -Value \"Created by Scoop to block the built-in autoupdater.\" -Force -ErrorAction SilentlyContinue | Out-Null", "# Make the file readonly", " Set-ItemProperty -Path \"$updateFile\" -Name IsReadOnly -Value $true -ErrorAction SilentlyContinue | Out-Null", "# Make the file modify-protected from self", " $Ace = New-Object System.Security.AccessControl.FileSystemAccessRule(\"${env:username}\", \"Modify\", \"Deny\")", " $Acl = New-Object System.Security.AccessControl.FileSecurity", " $Acl.AddAccessRule($Ace)", " Set-Acl -Path \"$updateFile\" -AclObject $Acl -ErrorAction SilentlyContinue | Out-Null" ] }, "shortcuts": [ [ "Spotify.exe", "Spotify" ] ], "uninstaller": { "script": [ "if ($cmd -ne 'uninstall') { return }", "", "## Undoing the steps to block the built-in autoupdater ##", " $updateFile = \"$env:LOCALAPPDATA\\Spotify\\Update\"", "# Remove modify-protection for the Update file", " $Ace = New-Object System.Security.AccessControl.FileSystemAccessRule(\"${env:username}\", \"Modify\", \"Deny\")", " $Acl = New-Object System.Security.AccessControl.FileSecurity", " $Acl.RemoveAccessRule($Ace)", " Set-Acl -Path \"$updateFile\" -AclObject $Acl -ErrorAction SilentlyContinue | Out-Null", "# Delete the Update file", " Remove-Item -Path \"$updateFile\" -Recurse -Force -ErrorAction SilentlyContinue | Out-Null", "", "Start-Process -Wait \"$dir\\Spotify.exe\" -ArgumentList '/Uninstall', '/Silent'" ] }, "checkver": { "script": [ "$dl_url = 'https://download.scdn.co/SpotifyFullSetupX64.exe'", "$dl = cache_path 'spotify' 'unknown' $dl_url", "Invoke-WebRequest $dl_url -OutFile $dl", "$ver = (Get-Item $dl).VersionInfo.ProductVersion", "Move-Item -Force $dl (cache_path 'spotify' $ver $dl_url)", "$ver" ], "regex": "(\\S+)" }, "autoupdate": { "architecture": { "64bit": { "url": "https://download.scdn.co/SpotifyFullSetupX64.exe" }, "arm64": { "url": "https://download.scdn.co/SpotifyFullSetupARM64.exe" } } } }