Windows Service startup time

2019-09-18 01:01发布

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" state.

Thank you in advance!

P.S. I'm not asking for software recommendation.

1条回答
Deceive 欺骗
2楼-- · 2019-09-18 01:53

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.

查看更多
登录 后发表回答