An automated Batch script for Windows designed to recurrently install and update the Spicetify CLI every time a user logs into their system.
The script automates the following steps to execute the official installation command (iwr ... | iex) silently on every system startup:
- Script Folder Creation: It creates a persistent directory at
C:\Scripts. - PowerShell Script Creation: The file
spicetify_install.ps1containing the official install command is saved toC:\Scripts. - Wrapper Script Creation: The file
spicetify_start.batis created to execute PowerShell invisibly (start /min). - Startup Shortcut: A shortcut (
.lnk) is placed in the current user's Startup folder.
The two main files used in this setup are:
- Setup Script:
setup_autostart.bat(The executable installer) - Core Command:
spicetify_install.ps1(The underlying PowerShell command)
- Administrator rights for the initial setup.
-
Download: Download the
setup_autostart.batfile from this repository. -
Execute as Administrator:
- Right-click the downloaded
setup_autostart.batfile and select "Run as administrator".
- Right-click the downloaded
-
MANUAL CONFIRMATION (Batch Prompt): Type 'Y' and Enter After starting, the console will prompt: "Do you want to start the installation?". Type Y to proceed.
-
CRITICAL INTERRUPTION (PowerShell): Type 'Y' and Enter Immediately after the batch script continues, a PowerShell window may appear asking to install a missing component required for Spicetify features (such as the Marketplace).
- You MUST type
Yand press Enter to allow the script to proceed. This manual confirmation is mandatory.
- You MUST type
-
Alternative Execution via Terminal (Drag & Drop):
- Open the Command Prompt (
cmd) or PowerShell as Administrator. - Drag the
setup_autostart.batfile into the Terminal window. - Press Enter to run the script (and perform Steps 3 & 4 if prompted).
- Open the Command Prompt (
-
Finished: The routine is set up. The script will now execute automatically upon every subsequent user login.
Your antivirus software (e.g., Malwarebytes) may flag the
setup_autostart.batfile ONLY during its initial execution.Reason: The script downloads and executes remote code via PowerShell (
iwr ... | iex), which is often flagged by scanners as Generic Payload or Suspicious Behavior.
- This is a False Positive: The script performs only the official Spicetify installation command.
- If you trust the Spicetify source, you must allow execution or add an exclusion for the
setup_autostart.batfile in your antivirus program before starting.- Important: This alarm affects only the initial setup script, not the recurring automatic startup execution.
This script executes a command that downloads code from an external server and runs it immediately (iwr -useb ... | iex). Ensure you trust the source (Spicetify CLI) before running the automated script, and consider reviewing the contents of the official installation script periodically.
To stop the automatic execution, simply delete the created shortcut:
- Press
Win+Rand typeshell:startupand press Enter. - Delete the shortcut named
Spicetify Autostart.lnk. - Optionally, you can also delete the
C:\Scriptsfolder to remove the script files.
This project is licensed under the MIT License.
