Jump to content

Easy way to tell if PC rebooted or shut down?


0phoi5

Recommended Posts

Hi guys,

Apologies if this is a bit of a simple question, I've not come across it before and a Google search yielded a lot of irrelevant results.

Is there a simple way to tell if a PC was Restarted or Shut Down on it's last power down? As in, tell if the user selected 'Restart' or selected 'Shut Down' within Windows 7?

Thank you.

Link to comment
Share on other sites

9 minutes ago, Rkiver said:

Sorry, I don't think I was clear.

I need to know whether the user Shut Down the PC completely, OR if they instead rebooted the PC.

I can't see anywhere in Event Viewer where it states whether the 'shutdown transition' was due to a restart or an actual shut down.

This is why the Google search yielded too many results. I need to know which out of the two options the user selected to power down the PC. They either selected 'Shut Down' or they selected 'Restart', I'm looking to find out which.

Thank you.

Edited by haze1434
Link to comment
Share on other sites

2 minutes ago, Just_a_User said:

Thank you. Unfortunately, I can't see that guys answer is relevant to Windows 7; the reg key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shutdown Setting does not exist.

Link to comment
Share on other sites

1 minute ago, haze1434 said:

Thank you. Unfortunately, I can't see that guys answer is relevant to Windows 7; the reg key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shutdown Setting does not exist.

Was worth a shot. What about the last comment, seems to be aimed at Win7

Link to comment
Share on other sites

14 minutes ago, haze1434 said:

Unfortunately the first reply was to do with telling whether the PC was powered down at all, not which option was selected to power it down out of Shut Down or Restart.

I thought it could differentiate between which option was selected, as he says "determine what the user last selected from the Shut Down dialog" sorry didnt realize was only in <=WinXP my bad.

The last comment on page says "Possible experimental solution for Windows7 could be the following. (I'm not sure if this works well with other localizations, therefore I would call it a workaround)" and states it returns "The following is an example of XML which is written to the event log when a PC is restarted:"

Edited by Just_a_User
Link to comment
Share on other sites

4 minutes ago, Just_a_User said:

I thought it could differentiate between which option was selected, as he says "determine what the user last selected from the Shut Down dialog" sorry didnt realize was only in <WinXP my bad.

The last comment on page says "Possible experimental solution for Windows7 could be the following. (I'm not sure if this works well with other localizations, therefore I would call it a workaround)" and states it returns "The following is an example of XML which is written to the event log when a PC is restarted:"

Thanks.

I can't see that Event Viewer IDs 6005 and 6006 show much, other than 'The Event log service was started/stopped'. Doesn't give the reasons.

It looks like that 'Turned On Times View' application is not downloadable here at work so I can't test, but I believe it just takes the reasons a Windows Server was shut down from an actual pop-up that user's fill in, rather than whether Shut Down or Restart was selected by users on a PC (not a server).

The reason I was attempting to acquire this info is that we have a wide-spread issue that can be resolved by users Shutting Down the PC completely (not selecting restart, but selecting shut down). Some users are coming back and saying it doesn't work, so we need to determine whether it's PICNIC or whether they really did Shut Down.

Link to comment
Share on other sites

It looks like windows uses either EWX_SHUTDOWN (0x00000001) or EWX_REBOOT (0x00000002) on powering down the PC.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa376868(v=vs.85).aspx

Currently trying to determine which one was run, very difficult to find a decent article on it though! I'll keep looking.

Edited by haze1434
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...