Windows 10: Stop apps from re-opening after shutdown/restart- 1709 Fall Creators

  1.    08 Dec 2017 #1

    Stop apps from re-opening after shutdown/restart- 1709 Fall Creators


    I came across this new behavior a couple days ago and thought I did something screwy to my image. I read Bree's post and found it's an intended feature now on a restart Fall Creators Update reopens apps from before

    That thread has some good suggestions for alternate shutdown methods. The intention of this tutorial is to restore pre-1709 (like) functionality to the normal Restart and Shut down buttons in the Start menu.

    Since the default reboot behavior uses the shutdown.exe slash G switch - applications that are left open will attempt to "register" themselves to be re-opened. This is done by creating a RunOnce value at logoff, so you won't see it while online. Not all apps are capable of registering themselves in this way and can't be re-opened automatically.

    In the below screenshot I have left a few programs open, shutdown the computer, then booted to WinPE and loaded my HKCU hive in regedit. You can see the apps that are going to be re-opened once I boot back up, each named like "Application Restart".
    Click image for larger version. 

Name:	Clipboard05.jpg 
Views:	4 
Size:	97.1 KB 
ID:	167401

    The script below will remove every value starting with "Application Restart #"
    Code:
    $HKCURunOnce='HKCU:Software\Microsoft\Windows\CurrentVersion\RunOnce'
    (Get-ItemProperty $HKCURunOnce).PSObject.Properties | 
    Where-Object {$_.Name -like "Application Restart #*"} |
    ForEach {Remove-ItemProperty -Path $HKCURunOnce -Name $_.Name}

    You can set this as a user logoff script in gpedit or gpmc, or use the attached scripts:

    -Extract "NoApplicationRestart.zip"
    -Run "NoApplicationRestart_INSTALL.bat"

    I have tested this with Enterprise and Pro, not sure if Home supports the group policy side of it all. You will need local admin permission to make the required changes.
    Last edited by harvey263; 08 Dec 2017 at 23:22.
      My ComputerSystem Spec

  2. TairikuOkami's Avatar
    Posts : 3,418
    10.6 Home 1809 x64
       09 Dec 2017 #2

    I remove all startup entries at shutdown and RadeonSettings.exe still started, only using shutdown command helped.
    Attached Thumbnails Attached Thumbnails capture_12092017_141801.jpg  
      My ComputerSystem Spec

  3.    09 Dec 2017 #3

    harvey263 said: View Post
    You can set this as a user logoff script in gpedit or gpmc, or use the attached scripts:

    -Extract "NoApplicationRestart.zip"
    -Run "NoApplicationRestart_INSTALL.bat"
    I have removed this attachment from my original post because I realized the install batch was not working after testing some more. Do this instead:
    copy this code into Notepad and save it as "NoApplicationRestart.ps1"
    Code:
    $HKCURunOnce='HKCU:Software\Microsoft\Windows\CurrentVersion\RunOnce'
    (Get-ItemProperty $HKCURunOnce).PSObject.Properties | 
    Where-Object {$_.Name -like "Application Restart #*"} | 
    ForEach {Remove-ItemProperty -Path $HKCURunOnce -Name $_.Name}

    Open "gpedit.msc" and go to User Configuration > Windows Settings > Scripts (Logon/Logoff)
    Open Logoff Properties and click the "PowerShell Scripts" tab
    Click "Add" then "Browse" and select the "NoApplicationRestart.ps1" file
    gpedit will look in "C:\Windows\System32\GroupPolicy\User\Scripts\Logoff" by default, but you can save it elsewhere.
    Click OK to save it. Then you can leave a few apps open and restart the computer to test if it's working.
    Click image for larger version. 

Name:	LogoffScript.png 
Views:	2 
Size:	52.0 KB 
ID:	167490

    I wish I could have edited my original post. Not sure if I'm being dense, but can't find the pencil button anywhere.
    EDIT: ah, probably just too late to edit the first one
      My ComputerSystem Spec

  4.    09 Dec 2017 #4

    TairikuOkami said: View Post
    I remove all startup entries at shutdown and RadeonSettings.exe still started, only using shutdown command helped.

    How are you calling OFF.bat? If by "remove all startup entries at shutdown" you mean it is a Shutdown script (like below), that won't work.

    Click image for larger version. 

Name:	ShutdownScripts.png 
Views:	20 
Size:	23.1 KB 
ID:	167492

    The "Application Restart" RunOnce values get created after a Computer Shutdown script is run. You need to run it as a User Logoff script instead. I have an AMD card as well but don't seem to have RadeonSettings.exe installed to test that specific application. You should inspect your offline registry after shutting down to confirm what your batch file is actually accomplishing.

    EDIT: Thinking about it some more, Computer Shutdown scripts are run as the System account. So the reason that method doesn't work is because the wrong HKCU hive is being targeted. I'd still be curious to know how you are running your batch.
    Last edited by harvey263; 09 Dec 2017 at 13:14.
      My ComputerSystem Spec


 

Related Threads
After a Restart, all the apps that I had open and running before shutting down are reopened (and all tabs in a browser, if that's one of the apps that was open before). In Creators Update this didn't happen, apps were closed on shutting down and...
I am having issues updating from 1703 to 1709, and I could use some help. I used the native Windows Update tool to download 1709. I restarted my computer when prompted to begin the installation. I got about a quarter of the way through the...
Hi! When Windows update has just installed all the pending updates, the start menu don't show the option "update and restart", only "restart", "shutdown" and "sleep". It's normal?? I have Windows 10 PRO Fall Creators Update 64 bits. Thanks!
Solved Fall Creators 1709 Update Issue Possibly in Windows Updates and Activation
Hi All Not sure if this is a real issue or not, but it shows Other Updates all Failed, is it Related to Avast Free 17.8? or just a Windows 10 Update glitch, or nothing to be concerned about, I can try the update reset if need be
Only Games Tab is working, also my Desktop and Laptop are not working after the update. If I create a new user it works fine..... It happens on both laptop and desktop so it must be a settings or something with upgrade. I don't know.. It tried...
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 07:40.
Find Us