Getting last reboot time [duplicate]
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Displaying the build date How to know when was Windows started or shutdown? for my purposes I am writing a C# executable that will calculate the difference in time (minutes) from the time right now and the time the server was last rebooted. What I am currently doing now is capturing and parsing the output from cmd -> "net stats server" and creating a new DateTime object then comparing that with DateTime.Now with