Windows Service startup time
Is there a way to programmatically retrieve start-up time/duration for all the Windows Services that have started during boot in Windows XP? That is, the time the service was initialized to getting to the "started开发者_如何学JAVA" state.
Thank you in advance!
P.S. I'm not asking for software recommendation.
I would start with looking at the logs in event viewer, check if that information you want is there.
If it is, then use Microsofts EventLog class to get the log you want.
For example if you're interested in the System log use -
EventLog systemLog = new EventLog("System");
systemLog contains a collection of all entries in the System log. Should be easy from there.
精彩评论