Windows 7 – How do I find out which one of those pesky programs keeps waking my machine from sleep?

Every night I put my Windows 7 machine into sleep mode, and every morning I wake up and the thing is running.  

How I can find out which process is waking the thing up?

I’ve already looked at the Event Log and for the past two days the answer seems to be the “Windows Image Acquisition (WIA) service entered the running state.”

What can I do about this?

Solution:

An excellent overview about this topic can be found at http://www.howtogeek.com/122954/how-to-prevent-your-computer-from-waking-up-accidentally/, specifically

powercfg -lastwake powercfg -devicequery wake_armed powercfg -waketimers