I've got PWRTEST.EXE from the Windows driver development kit at my disposal. It comes with the "tools" part of the install. This command-line utility will put the machine to sleep (s:3) or hibernate (s:4) and then automatically wake it up again after a set interval. As you might imagine, this is incredibly useful for automated software testing. I use it every day.
However, the version I've got refuses to run on anything older than Windows Vista. It requires OS version 6.x, so it won't run on XP. I've heard that older xp-compatible versions exist in older development kits, but I don't have access to them. Anyone have that? (I don't need the whole dev kit, just PWRTEST.EXE.)
NOTE: For XP, I have been running a tool called "Sleeper" from PassMark, but the latest version of this tool has another bug that I'm having trouble working around right now. I was only running Sleeper to work around the "pwrtest won't run on XP" bug, and now that Sleeper has a bug, I want to see if I can go back to pwrtest.