Windows update reboots

@kjk How does the pre-release build save the session? And what could prevent the session from saving/restoring?

Could it be as simple as periodically saving a simple session file containing the required info to restore open docs? And, if maybe there’s a problem restoring, the app could allow manual save/restore of a session. This would be OK with me. I’d rather that, than have to re-open my massive workspace of files.

FYI… for anyone annoyed and frustrated with Windows’ forced reboot, I can suggest one solution. I’ve been using an app called “O&O Shutup10”. Weird name, but it does a great job at disabling MS Windows auto-reboot (as well as many other covert behaviors). Note that you’ll need to manually do Windows Updates if you disable the auto-update/reboot.


Your open file list is periodically updated in your SumatraPDF-settings.txt file
that is the one to back up in case windows shutdown “corrupts” the normal flush or for some other reason “remember open files” is compromised

In a normal installation you will find it at %AppData%\SumatraPDF
you can copy and paste that into the top address bar of windows explorer or create a shortcut, In a “portable installation” it should be in the same folder as SumatraPDF.exe

once your files are “as you like it” then copy that file so you can replace it if it gets trashed by lightning (it honestly happened to me that a highly valuable graphics data file visually exploded before my eyes as a remote server site was struck)

I know about being able to specify when Windows 10 is active. That doesn’t help anything. The program reboots in the middle of the night or when I’m not around.

The pre-release version or Sumatra works sometimes, but it windows crashes it doesn’t recover the tabs. Also, if on a laptop that runs out of power, it doesn’t recover the tabs.

The SumatraPDF-settings.txt file is interesting. My laptop ran out of power, I restarted and all my tabs were forgotten (i.e. Sumatra opened with no tabs open). But looking at the settings txt file, I see references to all the previously open tabs.

Is there any way for me to get Sumatra to read this file and open the tabs?

My SumatraPDF-settings.txt file is located at appdata\roaming\SumatraPDF\


taking one part at a time

it is not the history list of files that were opened e.g.
FilePath = C:\whatever\pdf-sample.pdf
Favorites [
IsPinned = false
IsMissing = true
OpenCount = 0
UseDefaultState = false
DisplayMode = …etc etc
ReparseIdx = 0

it is this later section after Session Data that will be opened IF TABS are active at start

SessionData [
TabStates [
FilePath = D:\2017\Client Invoice 1029.pdf
DisplayMode = continuous
PageNo = 1
Zoom = fit width
Rotation = 0
ScrollPos = -1 -1
ShowToc = false
TocState = 1 3
FilePath = C:\AppData\Banking agreement.pdf
DisplayMode = book view
PageNo = 1
Zoom = fit page
Rotation = 0
ScrollPos = -1 -1
ShowToc = false

you can manually add your own files as required

if the file is valid the tabs will open

NOTE it is easy to corrupt the file manually so keep a backup before editing with notepad
ALSO if the path is invalid because you move files about Sumatra will remove the incorrect entries for the session (although it keeps them in the history list) as “is missing = true” thus their display state can be remembered if restored/reopened

it may be useful to cull any old dead entries in the larger history list

hope that helps

Strange, haven’t had the OS disobey the active hours setting even once here. Anyway, since this thread is about how to get Sumatra to deal better with unexpected reboots I won’t waste time attempting to elicit more information from you to diagnose what may be wrong with your system.

I’ve been using the pre-release v3.2.10766 64-bit version for a while now, and the “session restore” (or whatever we’re calling it) is not working. The last 2 days my PC at work has locked up at some point overnight. When I reboot, Sumatra opens with no files open.

I think some of those who’ve successfully observed session-restore work, may be restarting Windows “gracefully”, which is not the same as things like power-loss, lockup, etc.

I really like the “lightness” and simplicity of Sumatra, but this one basic issue is making it not-useful for me.

I’m happy to send any additional information which could help diagnose this issue.

Your long term problem must be very frustrating
It is natural that during a sudden brown out / power outage or other lock-up of your system the working session cannot be saved, what is unusual is that the (at that time) session file seems to be reset to zero in some way.

have you tried saving it as per your comment to manually save Windows update reboots on Dec 6th and my reply Windows update reboots see also details on Windows update reboots

A question may be raised about passwords to open PDFs since they also are saved in the settings.ini file

If the file is reset they would also be “forgotten”, if so this IS related since it appears SumatraPDF does not keep a back-up of the settings file during such an event, and thus the solution is the same as for others (keep your OWN back-up.)

It IS frustrating that during an all too frequent crash of supposedly military grade applications that it WILL insist on replacing the latest work file with a much older system back-up, it is difficult to find a balance between keeping a current work file in reserve (which could itself be corrupt) or spending weeks rebuilding from sources so I manually keep my own back-up copies on a regular basis thus only losing a couple of hours of most recent work

Just lost all my open tabs again on a windows update reboot. Still using 3.2.10766 pre-release 64bit version. Hasn’t happened in a while,but I just lost about 20 tabs.

Just lost all my tabs yet again due to system reboot in the night.

I don’t understand which setting you have turned off ?

My machine has been pestering me every few minutes for hours today to close everthing
Since it wants to screw up my machine with a monthly update,
but I’m strongly resisting since I lost gazzilions of data last time
I said yes to “Are you Really sure, to be sure.”

In Windows 10 Home edition, you can’t turn off automatic updates or even tell windows to download them and wait for you to install them. So windows waits until the machine is not busy, downloads, installs, and reboots.

On my laptop, which is not on all the time, the behaviour is as you describe above. It tells me it wants to do it and pesters me to close things. But with my desktop which is always on, Win 10 just does it in the middle of the night, no warning.

This is not a new issue, this is something people have been complaining about with Windows 10 Home edition since the first surprise update. There are a few work arounds, but they are clunky. Check this out:

Ok I now understand it is the same as living in the Bermuda thunderstorm triangle, eventually you get hit, like it or not.

My best suggestion was always keep a back-up of your settings file (however I don’t bother)
There are ways to duplicate on a time schedule with a time/date in name so you would only need to go back to yesterday pm

Yeah, that’s what I’ve finally resorted to. Just installed a little proggie to back up the settings.txt file daily. Should save my bacon.

1 Like

Just be cautious that a copy of a bad settings file can be worse than none at all, one or two issues were raised because the user had made poor entries but it is easy to delete the file and let it renew itself on start-up.

So when your “proggie” backs up the settings file keep a second
copy without overwrite since bad on bad is to be avoided

I always keep losing my PDF’s due to Windows updates or crashes as well and it’s driving me mad. 3.1.2 still seems to be the most recent version, so I take it my only choice is to switch to the pre-release version? Does that have some other drawbacks (like instability) as it hasn’t made it to the actual release yet?

Pre-release will not as such protect you from windows shutting SumatraPDF in an uncontrolled manner. My suggestion for that issue has been to use a secondary copy of the settings file (at worst that sets you back to session before last)
Note I very very rarely get unknown shut downs and apart from my own stupidity in deleting the settings file on occasions (while testing) I have never lost session history
However I am using 10pro and all settings are to warn me to close applications before monthly updates.

Pre-release has considerable improvements over the few years but still has some known issues so for example is less useful for printing using the external command line.

Equally the highlight function has only changed trigger key to A, i.e. there have been no improvements in that code.

Thank you for the suggestion. However, I think manually copying and maintaining a secondary settings file is quite inconvenient and something I don’t want to have to remember. My laptop runs out of battery at least once a week which is usually why I lose the tabs (Windows updates or other updates required by the company are another cause).

Couldn’t Sumatra automatically make a backup of the settings file for recovering the session after crashes (which I assume is what Chrome and other programs do that can recover the tabs)? I wonder also if keeping the settings file in Dropbox (where it syncs until a crash) would help…