0

Is there a way to reboot W2K in a native way?

ExitWindows(Ex)
InitiateSystemShutdown(Ex)

Works starting from Windows XP. May be I can kill a kernel to force the reboot but it's weird. I wasn't able to find anything on MSDN.

pugnator
  • 665
  • 10
  • 27

1 Answers1

3

For InitiateSystemShutdown, MSDN states that the minimum supported version is XP, but that can easily be misinterpreted. This does not mean that the function was introduced in XP. Sometimes when MSDN documentation is updated, the minimum supported version fields are updated to be at least the minimum supported OS version, even if that version is later than the version in which the function was introduced.

In this case, for this function, you can certainly use it on Windows 2000.

If you are still actively targeting such an old version of Windows, you really should try to find an old MSDN disk and refer to the documentation from that. That will make your life much simpler.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
  • Thank you a lot! I didn't except such a weird behaviour from MS side. As there are many many articles that still shows "Starting from W2K". I have to support w2k 2 years more, so yes. Thanks a lot for idea about old MSDN disk! – pugnator Nov 19 '15 at 09:35
  • Those starting from w2k articles just have not been updated since w2k support ended. Any such articles updated today would be changed to state that support starts with vista. – David Heffernan Nov 19 '15 at 09:38
  • 1
    That's actually a misinterpretation of what the MSDN really says: *"Minimum **supported** client/server"*. This does not imply which version introduced a particular API, but rather, which versions are guaranteed to support the documented contract. Any changes to the behavior will not be backported to unsupported versions. The easiest way to find out, whether an unsupported OS offers a particular API is to [modify WINVER and _WIN32_WINNT](https://msdn.microsoft.com/en-us/library/6sehtctf.aspx) and have the compiler tell you (even though you might get other errors for unsupported versions). – IInspectable Nov 19 '15 at 10:06
  • @IInspectable That's certainly what I meant. Perhaps I did not express it clearly. – David Heffernan Nov 19 '15 at 10:53
  • "Whenever" = "Sometimes when" :) – Jonathan Potter Nov 19 '15 at 10:54
  • *"MSDN states that this is supported from"* - that's what I was referring to. This is not at all what the MSDN states. It says *"Minimum **supported** client/server"*, not *"Minimum **supporting** client/server"*. – IInspectable Nov 19 '15 at 11:05
  • 2
    From the MSDN Library October 2001: "*InitiateSystemShutdown ... Included in Windows NT 3.1 and later*". That's why the online MSDN is useless to anyone having to support legacy no-longer-officially-supported versions of Windows. – dxiv Nov 20 '15 at 06:34
  • 2
    @dxiv: I think that's fair enough, though. Keeping the documentation accurate for every version going back indefinitely would be way more trouble than it's worth. Those few people affected can use their MSDN CDs or the Wayback Machine. – Harry Johnston Nov 21 '15 at 23:58