c00000fd
c00000fd

Reputation: 22327

powercfg returns different results depending on 32-bit vs. 64-bit version

I was trying to call powercfg tool from my 32-bit application running on a 64-bit version of Windows 8.1 using CreateProcess with the following command as lpCommandLine parameter:

"powercfg -waketimers"

It worked fine, except that purely by chance I discovered that it was returning a different looking report than if I ran the same from the Command Line window.

Here's what I was getting in my 32-bit process:

Timer set by [PROCESS] Legacy Kernel Caller expires at 4:00:02 AM on 1/20/2016.
Reason: 

Timer set by [PROCESS] Legacy Kernel Caller expires at 3:59:00 AM on 1/20/2016.
Reason:

and here's what I was seeing in Command Line window:

Timer set by [SERVICE] \Device\HarddiskVolume4\Windows\System32\svchost.exe (SystemEventsBroker) expires at 4:00:02 AM on 1/20/2016.
Reason: Windows will execute 'NT TASK\Microsoft\Windows\TaskScheduler\Regular Maintenance' scheduled task that requested waking the computer.

Timer set by [SERVICE] \Device\HarddiskVolume4\Program Files (x86)\Common Files\Acronis\Schedule2\schedul2.exe (AcrSch2Svc) expires at 3:59:00 AM on 1/20/2016.

So I'm curious, are 32-bit and 64-bit versions of that tool supposed to return different results? Because the only way I can remedy this and get a full report (2nd version above) from my 32-bit process is to detect it running as WOW64 and then use the following path for a forced 64-bit redirect:

"C:\\Windows\\SysWow64\\powercfg.exe -waketimers"

Upvotes: 1

Views: 347

Answers (0)

Related Questions