How to know when was Windows started or shutdown?

前端 未结 7 687
粉色の甜心
粉色の甜心 2020-12-10 05:12

I need to develop a program in C# find out when was Windows started or shutdown.

Is there a log file that I can read to know Windows start and shutdown times? Or do

7条回答
  •  离开以前
    2020-12-10 05:22

    Some more options:

    • Get the date-time of last windows shutdown event using .NET
    • http://www.codeproject.com/KB/cs/GetLastRebootTime.aspx

提交回复
热议问题