How to prevent Windows from restarting programs that were running before restart from update

2

On Windows 10.0.14393, when Windows Update causes my computer to restart, after logging in again, some programs that were running before shutdown are started again. Programs that I've seen this happen for are Outlook, Internet Explorer, Visual Studio and SQL Management Studio, but there may be more (seems to be Microsoft programs only though). Some of these are run as administrator, and for those I get a UAC popup.

Most of these programs don't restore to their exact previous state anyway, so it's pretty useless, and it's also disconcerting that the computer seems to take control just after logging in.

I haven't seen options in these programs that cause them to be restarted after a computer restart, so I think Windows is doing this.

I want Windows Update to restart the machine in my absence, I just don't want it to try to restore the running programs. How do I stop Windows from doing that?

(I know about the setting in Windows Explorer and already turned it off. This is about other programs.)

gpvos

Posted 2017-08-08T08:58:35.110

Reputation: 123

1Since the new Creators update, shutdown.exe has a new parameter: /g (restart pc and start any registered program at startup). So this is the cause of what you're experiencing. I don't know how to block the behavior, but I assume that if you get the shutdown.exe from a previous windows 10 version, and replace it with the current one, the behavior will stop. – LPChip – 2017-08-08T09:22:32.610

@LPChip: Thanks! It seems that I indeed want to suppress (this part of) the behaviour of the Windows Restart Manager. Replacing shutdown.exe is unlikely to work, as the /g parameter probably just makes it pass the proper flag to the ExitWindowsEx or InitiateShutdown function, and most installers will call one of those functions themselves. – gpvos – 2017-08-08T09:45:33.400

You could force restart in minimal mode (only a few MS services, no third party), either with or without networking. You just set "bootnext" variable using bcdedit. – snayob – 2017-08-08T10:29:43.293

14393 is 1607 not 1703. Which means 1607 does not have the feature that only exists in 1703. – Ramhound – 2017-08-08T11:55:27.837

@Ramhound: It looks like this restart manager already exists since Vista. Maybe shutdown.exe got updated more recently, but I don't think that is relevant in this case, as I already wrote above. – gpvos – 2017-08-08T16:26:19.470

No; The feature you describe is indeed a new feature that came to Windows 10 1703. Are you sure you are running 1607 though? – Ramhound – 2017-08-08T16:28:29.533

Yes, 1607, and I'm fairly sure I got it in earlier versions too. The documentation for RegisterApplicationRestart, which implements this, says it's available since Vista, and here is a question from 2011 about exactly the behaviour I described: https://superuser.com/questions/304539/windows-restarting-certain-applications-after-a-windows-update

– gpvos – 2017-08-09T08:57:08.840

@snayob: But the restarts can come unexpectedly, so basically I would have to configure this always, and would never have a normal restart. And maybe when I did a normal restart afterward, the programs from an earlier restart might get restarted again (did not check). Also, there are programs configured to startup automatically that I like. I am looking for something that makes my workflow more normal, not worse. – gpvos – 2017-08-09T09:00:32.070

No answers