With the PC switched on.
Sorry, an O/S is active even though the user isn't doing anything... as in - if they are pulling the battery they can't be working on the PC.
I have to say that the behavior of individual PCs may vary. Certainly a sudden power loss should be handled by Windows such that no operating system damage is done. I was assuming that users would realise the necessity to shut down all programs and save
data etc.
I hope this works for you. It may be specific to HP laptops, even the model I use, and at worst for everyone else, just mine. But I shared the info just in case it works for others.
25/04/18 Update
So far every time I have pulled out the battery when logged in (and then put the battery back again) the display timeout has reverted to values I entered in the display settings.
I'm still not sure what triggers the display to revert to a short timeout. It may be the time of day...
15/07/18 Update
I have discovered that normal screen timeout can be restored by removing the battery after putting the PC into sleep mode ie pressing the power button. I am not sure but I suspect that when the OS sleeps there is nothing going on that a loss in power would
upset. With the PC alive (active) that always used to be a risk and probably still is. So far using this method has not caused me any problems.
Pulling the battery recently with the PC alive made it give a blue screen at startup. My recovery memory stick restored normal operation, but clearly pulling the battery has its risks.
After much investigation it appears there is no correlation between the screen timeout and deleting the user temporary folder contents.