Skip to content

Instantly share code, notes, and snippets.

@pizycki
Last active February 4, 2019 11:28
Show Gist options
  • Select an option

  • Save pizycki/949a0b2dde34bdb7bcb71c0226d3f107 to your computer and use it in GitHub Desktop.

Select an option

Save pizycki/949a0b2dde34bdb7bcb71c0226d3f107 to your computer and use it in GitHub Desktop.
Spotify install script
iex ((New-Object System.Net.WebClient).DownloadString("https://gist.githubusercontent.com/pizycki/949a0b2dde34bdb7bcb71c0226d3f107/raw/SpotifyInstall.ps1"))
if (Test-Path("C:\IzzySpotify")) {
rm "C:\IzzySpotify" -Recurse -Force
}
echo "Spotify will be installed in: C:\IzzySpotify"
mkdir "C:\IzzySpotify" | out-null
write "Downloading Spotify setup file..."
iwr -Uri "https://download.spotify.com/SpotifyFullSetup.exe" -OutFile "C:\IzzySpotify\Installer.exe"
write "Lanching setup..."
Write-Warning "Setup will fail with error code 17. Just click OK button - the installation script will continue its work."
Start-Process "C:\IzzySpotify\Installer.exe" -Wait
rm "C:\IzzySpotify\Spotify" -ErrorAction Ignore -Force -Recurse
write "Copying installation files..."
cp "$env:APPDATA\Spotify" "C:\IzzySpotify" -Recurse
write "Changing Spotify executable name"
mv "C:\IzzySpotify\Spotify\Spotify.exe" "C:\IzzySpotify\Spotify\Sptfy.exe"
write "Launching Spotify"
ii "C:\IzzySpotify\Spotify\Sptfy.exe"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment