Location:
State:
Carrier
Country
Status

Disable log-off while account is locked.


I'm using Windows 10 Enterprise. When I leave my computer I lock it using the windows key + L. After some time when I unlock the account I see that my account was logged off and I lost all my running programs (everything just restarted). It also happens when I log in using Remote Desktop, exit it (not logging off) and then coming back after like 1-2 hours.
Is there anything I can do to prevent that happening?

Hi, suggest you have a look at your Reliability History and see if anything is being recorded around the times of interest. Are you sure your PC logged off rather than restarted? E.g. after a BSOD?

There's no errors in Reliability History. In event log I've got something like:


Errors here doesn't seem to be connected with the problem. I belive they're just thrown, because service is being stopped by log-off.

Suggest checking for event id 6005 or 6006 in the appropriate time periods. If you got that, your PC restarted.

Log off: might be 4647 (user initiated); 4634 (An account was logged off); 538: (User Logoff)
When you've confirmed it wasn't a restart, note these- assuming you find them.

Have a look at the times at which the event occurred - is there any consistency?

Could it be some scheduled task? An auto shutdown type of program?


Solved Windows 10 10130 logging off on inactivity? - Windows 10 blog

It's always worth searching the forum. You may well find more threads on this if you do so.

So that's what I found:


It logs me out after 2 hours of disconnecting from remote desktop.

Have you read #10 and around there in the link I posted?

Sorry. Don't know how I missed the link...
There were no restarts/shutdowns lately. Last shutdown was made 18.07.2016 by myself, so that's not the case. Also didn't find any events that You provided. Only those which I found.

Hi, so am I correct in thinking the log off occurs rather randomly and may not occur at all sometimes? (A consistent pattern is usually easier to identify)

What is then puzzling as you didn't find those event ids is what sort of event is actually occurring. Assuming a normal process is occurring, there should be a corresponding event log entry.

To identify the time when your PC logs off (or whatever it's doing) so you can inspect the event log at that time, try creating a very simple log, e.g. writing the time to a file every minute. So when you find the PC has logged off/whatever you can then note the last time and inspect the event log accordingly.

Many people have reported issue with sleep: either going to sleep or resuming.

If you wished to try preventing some of these events as an experiment, you could try this free program:

No, no, no. It's not random. It always logs me off 2 hours after disconnecting from Remote Desktop as shown in post #5. I don't know if You missed the screenshot or it doesn't show for you, but it's there.

You said 'There were no restarts/shutdowns lately.' so I wondered if that meant it had stopped happening you see. Anyway, I've suggested a way you might be able to find a related event in the log..hence the event id. So far you can't identify a related even id.

Is it log off or restart? If not, then what?

Beyond that it's elimination.
- does it happen in safe mode
- does it happen after a clean boot
- does it happen if you disable all scheduled tasks

etc... reach a point when it's not happening, and enable progressively or examine what's been disabled.

Disable log-off while account is locked.