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.