Quantcast
Channel: Squeezebox : Community : Forums - 3rd Party Software
Viewing all articles
Browse latest Browse all 2050

Windows (11) Auto Start Squeezelite

$
0
0
For those who are like me and use something else to program and control music playback than a user interface but want squeezelite tucked away in the dark daemon dungeons of windows this is small little script I use:

Put this in a .ps1 file
Code:

Start-Process `
        -FilePath "C:\Program Files (x86)\squeezelite-1.9.6-1198-win32\squeezelite-win.exe"`
        -ArgumentList "-D -s helene.kingma -n $Env:ComputerName"`
        -WindowStyle Hidden

Shift Right click this and select Copy Path
and in Task Scheduler (Win+r; taskschd.msc) create a job at logon with trigger At log on as action Start a Program with Program/Script being PowerShell and Arguments -File "path to the ps1 file you just copied" include the two " in that.

Or import a xml file containing this:
Code:

<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <Triggers>
    <LogonTrigger>
      <Enabled>true</Enabled>
    </LogonTrigger>
  </Triggers>
  <Settings>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>false</StartWhenAvailable>
    <RunOnlyIfNetworkAvailable>true</RunOnlyIfNetworkAvailable>
    <IdleSettings>
      <StopOnIdleEnd>true</StopOnIdleEnd>
      <RestartOnIdle>false</RestartOnIdle>
    </IdleSettings>
    <AllowStartOnDemand>true</AllowStartOnDemand>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>PowerShell</Command>
      <Arguments>-File "squeezelite.ps1"</Arguments>
    </Exec>
  </Actions>
</Task>

in the Task Scheduler and make sure the path to squeezelite.ps1 is correct

Viewing all articles
Browse latest Browse all 2050

Trending Articles