From 5a70caf64e629c2d0bbc7dcb61db44be4a857c4b Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 23 Jan 2024 10:32:35 +0100 Subject: [PATCH] restart spotify only when script invoked manually --- windows/blockthespot.bat | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/windows/blockthespot.bat b/windows/blockthespot.bat index f14f434..5b8562c 100644 --- a/windows/blockthespot.bat +++ b/windows/blockthespot.bat @@ -29,5 +29,13 @@ DEL %HOMEPATH%\Desktop\Spotify.lnk 2>NUL ie4uinit -show ECHO Suppression du raccourci du bureau -IF NOT "%1"=="yes" PAUSE +IF NOT "%1"=="yes" ( + :: Restart Spotify + PowerShell -Command "" ^ + "$dir = Join-Path -Path $env:APPDATA -ChildPath 'Spotify';" ^ + "$exe = Join-Path -Path $spotifyDirectory -ChildPath 'Spotify.exe';" ^ + "Start-Process -WorkingDirectory $dir -FilePath $exe" + + PAUSE +) EXIT /B