Windows restarting certain applications after a Windows Update

6

1

So I've come across this strange function in Windows where after a Windows Update and the reboot it tries to restore your session prior to restarting.

This though only works with Microsoft's own applications, namely Internet Explorer, Windows Explorer and Visual Studio. I didn't see it yet happening with other applications (I'll have to see with Office). Internet Explorer restores all tabs that were present before the forced Windows Update shutdown and Explorer opens all the folders again (like back in Windows 98 where it did this on every restart)

My question is: How did Windows Update implement this? How can other programs salvage this functionality too?

sinni800

Posted 2011-06-30T15:13:35.050

Reputation: 3 048

IIRC, these are built into the applications on a per-application basis. – Breakthrough – 2011-06-30T16:07:57.800

Hmm, sure of that? – sinni800 – 2011-07-08T16:25:37.017

Hold on, do you mean the application restores your session when you manually start it, or the application is started automatically and your session is restored? – Breakthrough – 2011-07-08T16:37:22.077

Automatically after for example a Windows Update is applied. Windows tries to sneak that by you if you leave your computer for a while. It automatically restarts your computer and attempts to restore the session how it was before. It did the restarting. Not all programs work with this mechanic though. So some will restart exactly the way they were and some will not restart at all. – sinni800 – 2011-07-10T23:20:26.697

Answers

-1

It's challenging to find out the specific implementation without knowing what version of windows you experienced this on (and more specifically the set of updates that were installed).

It's pretty logical in my opinion, Windows would not attempt to restore third-party programs since it has no idea what they might do, this is why only Microsoft's programs were restored.


There is a way to have explorer restore its windows when you restart your computer. This is a built-in option that can be found in Control Panel -> Folder Options. It is in the View tab and is called Restore previous folder windows on logon.

restore previous folder windows picture


The way that I imagine Windows Update may have implemented this behaviour, is by populating the Logged in User(s) RunOnce registry keys. If you are familiar with editing the Windows registry, the key is: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce] Just as the Run key, this key takes values of REG_SZ (String Value) with the name of the value being the description, and the data of the value being the absolute path to the program you want to start.

This key is read on logon to the current user account, and its values are discarded after being read. (The programs you specify here will open Once only and therefore simulate the behaviour that was experienced with Windows Update) So if it's unclear, Windows Update may have checked what Microsoft programs you have open and recorded them in this key.


There are programs I found online by searching for "restore windows session" which restore programs you had open before restarting your computer. An example of this type of program is:

Cache My Work

I am not familiar with this program; it is however reviewed on addictive tips

CausingUnderflowsEverywhere

Posted 2011-06-30T15:13:35.050

Reputation: 283

Can you expand upon how that program works? – Burgi – 2017-03-22T15:24:46.273

I never used it, has this edit cleared that up? – CausingUnderflowsEverywhere – 2017-03-22T15:53:44.310