s/o f4mi i love you f4mi's video on SqueezeBox
- srvany-ng to make squeezelite a service
- squeezelite (download) (i use x64-ffmpeg)
- a Windows computer
Create a local account on your machine. Let's call it Squeezelite
for example.
You do not want to run squeezelite as the Local System user, haha.
Run as administrator: netplwiz
Click on "Local account", set the username, set the password, input whatever for password hint, do not be
puppy-brained and forget the password.
Put srvany-ng.exe and your squeezelite exe file in a directory, ideally somewhere with no spaces or weird characters because I don't feel like explaining how to escape characters.
We'll assume C:\squeezelite\srvany-ng.exe and C:\squeezelite\squeezelite.exe for the sake of simplicity.
This will let you map Squeezelite so it uses the default audio interface of your computer. I'm a musician so I don't necessarily want it to grab my music interface.
Run, in a terminal (cmd.exe) the following
C:\squeezelite\squeezelite.exe -l
It will list a set of interfaces in the following fashion:
Output devices:
8 - Microsoft Sound Mapper - Output [MME]
9 - MAIN Left/Right (2- Minifuse 2) [MME]
10 - LOOPBACK Left/Right (2- Minifus [MME]
11 - Speakers (2- Sound Blaster Audi [MME]
[...]
85 - Output () [Windows WDM-KS]
87 - Speakers (Steam Streaming Speakers Wave) [Windows WDM-KS]
Pick the one that says "Microsoft Sound Mapper", and remember its number (in my case, 8)
Open an administrator terminal (right-click, "Run as Administrator") and run the following:
sc.exe create "Squeezelite-nopriv" start= auto obj= ".\Squeezelite" password= "I_am_puppyBRAINEDandForgot" binPath= "C:\squeezelite\srvany-ng.exe"
# This is going to tell you the service was created successfully
sc.exe description Squeezelite-nopriv "A service that runs Squeezelite through a non-privileged account"
We're halfway done. Let's open the registry with regedit.exe and do the following:
- Navigate to the following key (key = registry "folder"):
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Squeezelite-nopriv
- Create a new key (right click into the blank window, New -> Key). Call it
Parameters
- Click on Parameters, and inside it create a New -> String value. Call it
Application
. Set its value (by double-clicking it) to the path to your Squeezelite.exe (without quotes or whatever) so in our caseC:\squeezelite\squeezelite.exe
- Create another String value, call it AppParameters, and set its value to
-o <YourInterfaceNumber>
(so in my case it's-o 8
)
Now the service should be properly configured. Close the registry editor and if you feel pessimistic reboot your computer because touching the registry sometimes requires you to do that.
Open the task manager (taskmgr.exe) or the services console (services.msc). Look for "Squeezelite-nopriv" and right-click on it to start or stop it.
If you want to do it the command line way, you need an admin shell and then type:
sc start squeezelite-nopriv
to start itsc stop squeezelite-nopriv
to stop it
Open the Windows sound mixer and set it.
Easy:
- open a terminal as administrator (cmd.exe, right click -> run as administrator)
- type
sc.exe delete Squeezelite-nopriv
- reboot your computer
- open the registry and delete the key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Squeezelite-nopriv
if it still exists - go back to silence or hopefully Winamp 2.95/foobar2000