i have Windows 8.1 (x64) as OS. I want to start an Apache Server if my PC is booted via WOL. So my first attempt was to write a small program which starts every time in the autostart, this should perform a check if the PC was booted over WOL and if this is true it should start the apache. But how do I notice if my PC was booted via WOL? Thank you for your Help.


I would look to somehow incorporate powercfg into your program. In particular, use the "lastwake" flag. You'll probably need to force a WOL and then check it with Powercfg to see how it is reported.

| improve this answer | |
  • It says both times "0". – Asker Feb 18 '14 at 15:09
  • Doesn't work, there is no difference in the lastwake flag. – Asker Mar 25 '14 at 13:54
  • Try using "powercfg -devicequery wake_armed" to see what devices are allowed to wake the pc. – rrirower Mar 25 '14 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.