I came across a friend’s Windows 10 computer that is refusing to shutdown due to a Windows Task Scheduler task/job/daemon/service/thing called RegisterUserDevice, located at \Microsoft\Windows\DeviceDirectoryClient.
The message it causes while shutting down (or more precisely, trying to) looks like this:
Closing 1 app and shutting down
To go back and save your work, click Cancel and finish what you need to.
For reference, this is happening on Windows “Version 10.0.16299.371” or so ver on tells me.
I’m lost at this point, Task Scheduler (opened by Run as taskschd.msc) isn’t giving any clues as to what executable this is, or why Windows is running this in the first place. All it gave was:
Task Name
Triggers
Location
RegisterUserDevice
Multiple triggers defined
\Microsoft\Windows\DeviceDirectoryClient
Web searches are giving an absurd range of responses that don’t seem to have any clue of what’s going on.
Does anyone know what might be causing this, or what RegisterUserDevice is doing?
Also, does anyone know why you can’t run ver in Powershell?
I should mention that Windows Task Scheduler (taskschd.msc) is a bit strange, the main view will show all the options for the selected task greyed out. You need to double click on its listing or click the properties button to be able to change anything.
Anyway, what I ended up doing was:
Ending the task manually
Tried to shutdown again multiple times - no good, still blocked
Disabling the task - not permitted, even when running as Administrator
Tried to change the description property - just to see if I could leave myself a note of "this task has blocked shutdown / been stupid before"nope, some sort of error even for this
Tried to shutdown again in desperation - this time it worked ???
In short, I have no idea what this was, but I haven’t heard about this problem again.
The machine is now on Version 10.0.16299.431
However, I checked Windows Task Scheduler (taskschd.msc) again, and noticed that Last Run Result column is now showing: “No such interface supported (0x80004002)” and its Last Run Time is yesterday. Presumably my friend had logged in then.
Oh, I had made a minor edit to the main post before replying to myself.
Sure enough, Fast Startup is enabled on this machine, but it hasn’t had the problem again.
Maybe the No such interface supported (0x80004002) error is preventing it from happening again, who knows.
Just thought I’d add what little I’ve learned to the thread.
I’m pretty sure I checked the System Log when this error happened, but maybe I didn’t know what I was looking for.
This tidbit about is Fast Startup is interesting though:
During Fast Startup, the kernel session is not closed, but it is hibernated. Fast Startup is a setting that helps the computer start faster after shutdown. Windows does this by saving the kernel session and device drivers (system information) to the hibernate (hiberfil.sys) file on disk instead of closing it when you shut down the computer.
When you restart the computer, this typically means that you want a completely new Windows state, either because you have installed a driver or replaced Windows elements that cannot be replaced without a full restart.
Therefore, the restart process in Windows continues to perform a full boot cycle, without the hibernation performance improvement that’s described in this article.
If it happens again, I’ll be sure to see if a restart fixes the problem when a shutdown does not.