Windows hangs during logoff [RESOLVED]


I’m having a problem on my machine which I believe is related to Comodo. Searching through the forums here I found one reference to what I think is a similar problem but it was from back in February of this year (and went unresolved), so instead of resurrecting that dead thread I figured I’d just start a new one.

The problem I’m having is that my machine (Windows XP, SP2) hangs whenever I attempt to logout from a user shell. What I mean is, I click Start → Log Off → Log Off, and the machine starts closing applications but then reaches a black screen and just sits there. Ctrl-Alt-Del do nothing, all I can do is hard-reset the machine via the power button.

I did however notice that if, instead of logging out, I simply perform a Fast User Switch (Win-L, or Start → Log Off → Switch User), I am able to then log in as a different user. I can then bring up the Task Manager, right-click on a user from the Users tab, select Log Off, and that user will be successfully logged-out.

Well, mostly.

It turns out that there is one process left hanging around under that user’s credentials: cpf.exe. What it appears is happening is that during logoff, Windows is attempting to terminate all processes initiated by the logging-off user - it stops almost everything, but cpf.exe refuses to go away. Since Windows can’t finish terminating all user processes (and can’t kill the process, as it attempts to do when it can’t stop them normally), it just sits there spinning, and never returns to the “choose a user” menu.

Is this a known issue that I simply wasn’t able to find by my searching? Does anybody have any suggestions as to what I could try doing?

Thanks in advance,

---  Mark  ---

Try the user profile hive cleanup service from Microsoft:

This usually speeds up shutdown or log off times and should help with your problem.


Neat! I hadn’t heard of that one before. Quite slick, it definitely appears to be able to work around the original problem I’d been seeing - users can now logoff successfully, with no hang, no cpf.exe lying around refusing to close.

Thanks for the tip!

---  Mark  ---

Glad it worked for you Mark. I will mark this topic as resolved and lock it. If you need it re-opened please PM a Moderator with your request and they will be happy to oblige.