Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1

    Conditional Suspend

    I use Server Power Control to Suspend my XP Squeezebox Server (or whatever it's called today). I also use the same computer to play movies, so I wanted to arrange for the the suspend to be conditional on the existence of the movie player process. To that end I cobbled together this VB script:

    vset service = GetObject ("winmgmts:")

    for each Process in Service.InstancesOf ("Win32_Process")
    If Process.Name = "vlc.exe" or Process.Name = "mpc-hc.exe" then
    End If

    Set WshShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run ("c:\windows\scpowertool.exe --standby --log" & WScript.ScriptFullName)


    So, Server Power Control calls the VB script and the VB script only calls scpowertool if neither of my movie players is running. So far so good. The problem is that when the script runs it momentarily pops up a window which forces the movie player out of full screen mode. I'm stuck - suggestions welcome!

    Last edited by Wiredcharlie; 2012-05-07 at 01:04. Reason: error

  2. #2
    Solved it! The command to enter in Server Power control is:

    c:\windows\system32\wscript.exe C:\Progra~1\Scripts\standby.vbs (or path to your script)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts