INTERACT FORUM

More => Old Versions => JRiver Media Center 28 for Windows => Topic started by: BayensF on January 02, 2022, 03:34:13 am

Title: Start a program at startup and exit of MC
Post by: BayensF on January 02, 2022, 03:34:13 am
Hi all,

I would like to know if it's possible to start a program at MC startup and exit. I would like to run a windows .bat file to activate and shutdown my amplifier. It's was done through W10 "startup" (speakers on) and "task scheduler" (speaker off). With W11 the "task" does not start, because the HTPC is in "sleep" before it can activate the task (only 1 second left to execute). As a result the Amplifier (ICEpower) does not switch off.

Many thanks in advance for your ideas and I hope sultion,

regards,

Fred
Title: Re: Start a program at startup and exit of MC
Post by: JimH on January 02, 2022, 08:18:02 am
Similar problem?

https://yabb.jriver.com/interact/index.php/topic,131586.0.html
Title: Re: Start a program at startup and exit of MC
Post by: BryanC on January 02, 2022, 09:52:49 am
If Windows tasks are unreliable plan B could be a smart plug.

I suppose that "On startup" and "On shutdown" could be added to MC's Scheduler plug-in, but this is more the realm of an OS-level service manager.
Title: Re: Start a program at startup and exit of MC
Post by: dtc on January 02, 2022, 11:16:43 am
Some of the ICEpower amps have auto-sense, which will turn on or off depending on input signal. Does that help?
Title: Re: Start a program at startup and exit of MC
Post by: BayensF on January 03, 2022, 07:53:03 am
Some of the ICEpower amps have auto-sense, which will turn on or off depending on input signal. Does that help?

Thanks for your reply. Yes I know this. But I have a relay in between the mains power andthe AMP. With a batch file it switch the AMP on when starting up the HTPC. When I switch the HTPC off it should start the off batch file to switch the mains off. I am just looking for a way to start the batch file when I push the on/off button of my HTPC
Title: Re: Start a program at startup and exit of MC
Post by: BryanC on January 03, 2022, 08:26:08 am
Thanks for your reply. Yes I know this. But I have a relay in between the mains power andthe AMP. With a batch file it switch the AMP on when starting up the HTPC. When I switch the HTPC off it should start the off batch file to switch the mains off. I am just looking for a way to start the batch file when I push the on/off button of my HTPC

You could hammer this out with Autohotkey (https://www.autohotkey.com/), but the best solution is figuring out why the Windows task scheduler is failing since this is what it is designed for.
Title: Re: Start a program at startup and exit of MC
Post by: BayensF on January 03, 2022, 08:53:18 am
Similar problem?

https://yabb.jriver.com/interact/index.php/topic,131586.0.html

Hi Jim,

Thanks for your reply. No sorry not similar. I have a ZWAVE network for other things available not linked to my HTPC. The HTPC is activating my ICEpower AMP PCB integrated in my HTPC through a relay board connected to USB. When the PC is switched on it starts the on.bat file to switch the relay. This can be done by placing the batch file in the Windows start up folder. So now I am looking for a solution to start the batch file with the off command to switch the relay to the NO position. I did it through a "Task Schedule" in windows 10. But Windows 11 is much faster when switching off the computer leaving no time to start the batch file.

F.
Title: Re: Start a program at startup and exit of MC
Post by: dtc on January 03, 2022, 11:06:57 am
Indirect, but you could have a shortcut to a bat file that turns off your relay, then shuts down the system, with a time delay (-t xx) on the shutdown command if necessary.