If the PC is off, or in sleep mode only the BIOS can turn it back on. If the PC is off, Windows isn't even running, if windows isn't running no programs are running. Same deal with sleep mode, Windows isn't running it's frozen. Only a hardware interrupt can trigger the BIOS to wake it up.