forked from Ash258/Shovel-Ash258
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Spotify.json
31 lines (31 loc) · 1.23 KB
/
Spotify.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"version": "nightly",
"description": "Spotify. Music streaming service.",
"homepage": "https://www.spotify.com/",
"license": "Freeware",
"pre_download": "if (is_admin) { throw 'Spotify needs to be installed from non-admin console for some reason.' }",
"url": "https://download.spotify.com/SpotifyFullSetup.exe",
"installer": {
"script": [
"Invoke-ExternalCommand \"$dir\\$fname\" -ArgumentList '/Silent' | Out-Null",
" # Kill opened Spotify",
"$done = $false",
"do {",
" if (Get-Process 'Spotify' -ErrorAction SilentlyContinue) {",
" Stop-Process -Name Spotify",
" $done = $true",
" }",
" Start-Sleep -Seconds 5",
"} until ($done)"
]
},
"uninstaller": {
"script": [
" # Terminate all process, which could interfere with Uninstallation process.",
"Get-Process -Name '*Spotify*' | Stop-Process -Force",
" # Wait for terminating all process.",
"Start-Sleep -Seconds 4",
"Start-Process \"$env:APPDATA\\Spotify\\Spotify.exe\" -ArgumentList '/Uninstall', '/Silent' -Wait"
]
}
}