Posted 24 December 2012 - 17:13
mains - you mean while plugged into power vs running on battery only?
As to while connected to specific network
Hmmm --- both should be possible with just the built in task scheduler -- just trigger them on an event. Now I don't believe there is event logged for change when plugged in or not plugged in, but it would be simple enough to monitor with a powershell script. Just do a google for monitor batterystatus powershell - simple Write-EventLog in your powershell script could be use to have an event happen when charging, when on battery. So your task could be setup to start your applications when on "mains" and then shut them down on "battery" only.
Same could be said for different events for when you are connected to a specific network, be it SSID based, IP based or some other check you could get from the eventlog, or create in the enventlog via powershell.