Windows 8 reports WRONG uptime (possibly total Hybrid-Boot uptime)
The up time shown in the picture is 6 Days, 1 hour, 34 Minutes, 22 seconds. I turned on this Laptop just about 7 min ago.
I actually think it like, Windows 8 reports the total up time while in Hybrid-Boot mode. How do I get the real up time?? Also, why does Windows reports it that way??
Is there any way to get the real up time in GUI way (for my n00b friend)??
UPDATE: I disabled Hybrid-Boot and rebooted. It now results the right uptime. Also, doing a full shutdown with
shutdown /s /t 0
also works.
Little more explanation, My question is that How to get the actual up-time (time from when we powered the system on) even if the Hybrid-Boot is enabled? Possibly in stock Windows without any external program, though not necessary.
Any explanation to this?
You want to get an out-of-the-box solution to find out the uptime of your machine since the last hybrid shutdown / fast startup took place, right?
You can get this information (as provided by @allquixotic) from the EventLog using PowerShell like this:
PS c:\> Write-Host $("{0:c}" -f ((Get-Date)- (Get-EventLog -LogName system -Source "Microsoft-Windows-Power-Troubleshooter" -Newest 1).TimeGenerated))
To embed powershell command into a Windows shell script you can do this instead:
c:\> powershell.exe -nologo -command Write-Host $('Time since last ''Fast Startup'': {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source \"Microsoft-Windows-Power-Troubleshooter\" -Newest 1).TimeGenerated))
Howerver, to get this to work out of the box, you could set it into a permanent environment variable like this instead:
c:\> setx HardwareUptime "powershell.exe -nologo -command Write-Host $('Uptime since last ''Fast Startup'': {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source 'Microsoft-Windows-Power-Troubleshooter' -Newest 1).TimeGenerated))"
so, you can then get it to work by opening up a cmd
window and doing:
c:\> %HardwareUpTime%
UPDATE:
I just found today that using the above entry in the event log will also take into account "Sleep" or suspend mode, so running %HardwareUpTime%
will tell you the elapsed time since the PC resumed from sleeping if you let it do so.
Therefore, here it is:
setx HardwareUptime "powershell.exe -nologo -command Write-Host $('Uptime since hardware boot: {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -InstanceId 27 -Newest 1).TimeGenerated)); Write-Host $('Uptime since system resumed: {0:c}' -f ((Get-Date)- (Get-EventLog -LogName system -Source 'Microsoft-Windows-Power-Troubleshooter' -Newest 1).TimeGenerated));"
I've modified the command a little bit to be more explicit and give you both pieces of information:
Elapsed time since Windows booted (either after a hybrid shutdown, full shutdown or simple reboot or hibernation).
Elapsed time since Windows resumed execution (after returning from sleep mode).
NOTE: If the system didn't sleep in between, both times will be the same.
Taken from here:
Check the Windows Event Log.
Press Windows Key+r
Enter in the box,
%windir%\system32\eventvwr.msc /s
Click "Create Custom View..." on the right-hand side.
Set the settings like this:
Click OK
When prompted, give the custom view a name (this can be anything you want)
It will display the list of resume times
You should disable Hybrid-Boot and reboot. It should display the right uptime. Also, doing a full shutdown with shutdown /s /t 0
also works.