Skip to content

Instantly share code, notes, and snippets.

@Boboss74
Last active February 8, 2019 08:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Boboss74/bd12c89bb054262413d8162c8ef0f195 to your computer and use it in GitHub Desktop.
Save Boboss74/bd12c89bb054262413d8162c8ef0f195 to your computer and use it in GitHub Desktop.
Mute spotify advertising: run when ads are starting, then the script will mute during ~50 sec, then unmute
# Mute spotify advertising
# Script powershell Windows 10
#
# Run when ads are starting, then the script will mute during ~50 sec, then unmute
$obj = new-object -com wscript.shell
$obj.SendKeys([char]173)
Start-Sleep -Seconds 50
$obj.SendKeys([char]173)
exit
# Run the script within a shortcut, create a shortcut with the target:
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\PATHTOMYSCRIPT\mute-spotify-ads.ps1"
# There is a (ugly) hacks to be able to pin the shortcut AND pin powershell at the same time in different place
# Create a shortcut to the previous one, then remove the first created
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment