Skip to content

Commit 5c0d55c

Browse files
authored
Add files via upload
1 parent 93ac178 commit 5c0d55c

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

spicetify_install.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
iwr -useb https://raw.githubusercontent.com/spicetify/cli/main/install.ps1 | iex

spicify.bat

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
@echo off
2+
setlocal
3+
4+
:: ----------------------------------------------------
5+
:: 1. DEFINITIONEN
6+
:: ----------------------------------------------------
7+
:: Der feste Pfad, wo das Skript gespeichert wird (muss existieren)
8+
set SCRIPT_DIR=C:\Scripts
9+
:: Name des PowerShell-Skripts mit dem eigentlichen Befehl
10+
set PS_SCRIPT_NAME=spicetify_install.ps1
11+
:: Name des Batch-Wrapper-Skripts, das im Autostart landet
12+
set WRAPPER_SCRIPT_NAME=spicetify_start.bat
13+
:: Der Speicherort für den aktuellen Benutzer-Autostart-Ordner
14+
set STARTUP_FOLDER="%%APPDATA%%\Microsoft\Windows\Start Menu\Programs\Startup"
15+
16+
:: ----------------------------------------------------
17+
:: 2. ERSTELLEN DES SKRIPT-ORDNERS
18+
:: ----------------------------------------------------
19+
echo Erstelle Skript-Ordner: %SCRIPT_DIR%
20+
if not exist "%SCRIPT_DIR%" mkdir "%SCRIPT_DIR%"
21+
22+
:: ----------------------------------------------------
23+
:: 3. ERSTELLEN DER POWERSHELL-INSTALLATIONSDATEI
24+
:: ----------------------------------------------------
25+
echo Schreibe PowerShell-Befehl nach %SCRIPT_DIR%\%PS_SCRIPT_NAME%
26+
(
27+
echo iwr -useb https://raw.githubusercontent.com/spicetify/cli/main/install.ps1 ^| iex
28+
) > "%SCRIPT_DIR%\%PS_SCRIPT_NAME%"
29+
30+
:: ----------------------------------------------------
31+
:: 4. ERSTELLEN DER WRAPPER-BATCH-DATEI (fuer Autostart)
32+
:: ----------------------------------------------------
33+
echo Schreibe Wrapper-Batch-Skript nach %SCRIPT_DIR%\%WRAPPER_SCRIPT_NAME%
34+
(
35+
echo @echo off
36+
echo start /min powershell.exe -ExecutionPolicy Bypass -File "%SCRIPT_DIR%\%PS_SCRIPT_NAME%"
37+
) > "%SCRIPT_DIR%\%WRAPPER_SCRIPT_NAME%"
38+
39+
:: ----------------------------------------------------
40+
:: 5. ERSTELLEN DER VERKNUEPFUNG IM AUTOSTART-ORDNER
41+
:: ----------------------------------------------------
42+
echo Erstelle Verknuepfung im Autostart-Ordner: %STARTUP_FOLDER%
43+
:: Das Ziel ist das Wrapper-Skript
44+
set TARGET_PATH="%SCRIPT_DIR%\%WRAPPER_SCRIPT_NAME%"
45+
:: Der Name der Verknuepfung
46+
set LINK_NAME="Spicetify Autostart.lnk"
47+
48+
:: Nutze PowerShell, um die Verknuepfung zu erstellen, da Batch das nicht nativ kann
49+
powershell.exe -ExecutionPolicy Bypass -Command "$WshShell = New-Object -comObject WScript.Shell; $Shortcut = $WshShell.CreateShortcut(%STARTUP_FOLDER%\%LINK_NAME%); $Shortcut.TargetPath = %TARGET_PATH%; $Shortcut.Save()"
50+
51+
:: ----------------------------------------------------
52+
:: 6. ABSCHLUSS
53+
:: ----------------------------------------------------
54+
echo.
55+
echo Die Spicetify Autostart-Routine wurde erfolgreich eingerichtet.
56+
echo Sie wird beim naechsten Login ausgefuehrt.
57+
echo.
58+
pause

0 commit comments

Comments
 (0)