I was wondering if anybody knew of a way to Trigger a command when a laptop get's connected to a power source?
Here is my scenario.
We have users on Netbooks that get stored in a cart when not in use (End users do not have AC adapters for them).
Due to the limited resources on these machines we like to run as little as possible while in use (when running on DC power).
When the user is done with the machine they are instructed to log out and return the machine to the cart where it is left charging in an powered on state.
Ideally plugging the machine would trigger a script that would run the following "maintenance" script and shutdown
LDISCN32.exe /SYNC /ntt=superhappyfuncore:5007 /s=superhappyfuncore /I=HTTP://superhappyfuncore/ldlogon/ldappl3.ldz
We currently have something like this running after hours but this often leaves the machine running for unnecessarily.
Also wondering if their is a way to tell the script when the policy(s) (if any) have completed?
NOTE: We are running LDMS 9 SP2 and the machines are running Windows 7 Pro 32bit.
Currently playing around with Windows Task Scheduler setting the tasks to run when the system is idle and plugged in but it's not running as expected.
I'm guessing background tasks are preventing the machine from being "idle" so it's not working well.