Another for the "team that can"...
Several longstanding problems on the Keefpooter have been solved by the wise heads in here. I'm getting down to the little ones now...
I'm an owl, but M likes to turn in early, so the PC speakers go off at 10pm.
In the olden days, that was done with a timeswitch in the power connection to the speakers, and worked fine.
More recently, software fixes have been used. The first was a little app that kills the speakers according to a schedule. Then I found a clever little utility that will switch between speakers and headphones - it rejoices under the name of ToggleAudio. However, it needs an input when it starts, so using the task scheduler as-is won't do. I've written a little batch file that works perfectly.
BUT ... if I run that batch file under "Task Scheduler" it doesn't work. The .exe starts, and that's as far as it gets. If I look at Task Manager, I can see it in there (and stop it) but it doesn't do its job. Running the batch file from the desktop, it works fine, and closes OK so it's not sitting there in task manager.
What am I missing? Here's the batch file:
h:
cd H:\ToggleAudio\
toggle-audio-7.exe
choice /T 1 /C ync /CS /D y
taskkill /F /IM toggle-audio-7.exe
c:
exit
The "choice" line provides the .exe with an input to keep it happy.
The taskkill line is in there as an attempt to close it down when it's running from Task Scheduler (but doesn't work).
Last edited by Keef; 24th February 2013 at 18:24.