Windows restarting certain applications after a Windows Update

rebootwindowswindows update

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?

Best Answer

  • 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

  • Related Question