Windows 10: Back to Basics: Windows Shutdown Autostart explained

Discus and support Back to Basics: Windows Shutdown Autostart explained in Windows 10 News to solve the problem; Windows supports autostart functionality; the autostart on startup feature is the better known variant but there is also an option to autostart on... Discussion in 'Windows 10 News' started by GHacks, Aug 19, 2019.

  1. GHacks
    GHacks New Member

    Back to Basics: Windows Shutdown Autostart explained


    Windows supports autostart functionality; the autostart on startup feature is the better known variant but there is also an option to autostart on shutdown.

    Some programs add entries to the autostart list when they are installed. Programs like antivirus and security software may add entries so that they are launched as early as possible on the Windows PC.

    Windows administrators may configure devices running Windows to run certain programs or scripts during shutdown as well. Examples include running a script to clear temporary folders or the browsing history on the device, backing up certain files, delaying the shutdown of the system, or adding entries to log files.

    The caveats


    The autostart of programs or scripts during shutdown of the system has two caveats that need to be mentioned. First, that the functionality is only found in professional or Enterprise editions of Windows and not in Home versions, and second, that the scripts or programs are run on every shutdown or restart.

    The autostart entries are run each time, e.g. after installing updates that require a restart or installing a program that requires a restart to finalize the installation.

    The shutdown


    Back to Basics: Windows Shutdown Autostart explained windows-tutorial-shutdown-autostart.png

    The shutdown of the system begins with the termination of running (user) processes and signing out of the user. System processes are shut down after that first phase, and the device is turned off or restarted in the end. Windows supports running tasks in both of the shutdown phases, and both may be configured in the Group Policy Editor.

    • User Configuration > Windows Settings > Scripts (Logon/Logoff) > Logoff
    • Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) > Shutdown

    The first policy runs scripts during user log off on the system, the second after the user has been logged out of the system.

    The script's purpose determines where you need to add it for execution on shutdown. Scripts that you configure in the user configuration run with the rights of the user. The scripts are started after the termination of running processes including those that run in the system tray or in the background.

    Windows displays a blank screen usually when configured scripts are run but it is possible to run scripts with graphical user interfaces that the user may interact with. Scripts are terminated automatically unless configured to do otherwise, e.g. by using the wait command.

    Back to Basics: Windows Shutdown Autostart explained display-instructions-in-logoff-scripts-as-they-run.png

    You may also configure a policy to display a window when scripts run so that you know what is happening. Enable the policy "Display instructions in logoff scripts as they run" under User Configuration > Administrative Templates > System > Scripts to do so.

    A similar option is available for scripts that run in the second phase of shutdown. You find it under Computer Configuration > Administrative Templates > System > Scripts; it has the same name as the User Configuration policy: Display instructions in shutdown scripts as they run.

    Windows gives the combined scripts 10 minutes (600 seconds) of execution time by default. You can change the interval by configuring "Specify maximum wait time for Group Policy scripts" in the same Computer Configuration policy folder. You may select a range between 0 and 32000 seconds; 0 means that scripts run for as long as they need and that Windows won't interfere. Note that the policy affects startup and shutdown scripts.

    Shutdown scripts, those run in the second phase of the shutdown process run when no user is logged in anymore. These scripts run with system rights and not user rights. Administrators need to be aware that referenced user folders in scripts use the folders of the system user.

    The shutdown and logoff properties policy windows look identical. Both feature a tab that separates scripts from PowerShell scripts, options to add, edit, remove, and sort scripts, and a button to show files.

    Back to Basics: Windows Shutdown Autostart explained shutdown-properties.png

    A click on show files opens a script directory on the local system:

    • For Logoff scripts: C:\WINDOWS\System32\GroupPolicy\User\Scripts\Logoff
    • For Shutdown scripts: C:\WINDOWS\System32\GroupPolicy\Machine\Scripts\Shutdown

    You may place the scripts that you want executed in those folders; it is no requirement though and you can pick any folder on the system that is accessible during shutdown for storage. It may nevertheless be a good idea to place scripts in these folders for organizational purposes.

    Ghacks needs you. You can find out how to support us here (https://www.ghacks.net/support/) or support the site directly by becoming a Patreon (https://www.patreon.com/ghacks/). Thank you for being a Ghacks reader. The post Back to Basics: Windows Shutdown Autostart explained appeared first on gHacks Technology News.

    read more...
     
    GHacks, Aug 19, 2019
    #1
  2. little cat, Aug 19, 2019
    #2
  3. Weer Win User
    Reminder: Microsoft Windows 7 Beta Automatic Two-Hour Shutdowns Begin Today

    Does that work?
     
  4. Back to Basics: Windows Shutdown Autostart explained

    Shutdown problem on my Windows 10 laptop.

    Hello,

    We suggest that you follow the troubleshooting steps below to resolve the issues with the shutdown function of your laptop:

    • Type Troubleshooting in the search bar beside the Windows icon.
    • Select Troubleshooting from the results.
    • Under System and Security, select Fix Problems with Windows Update.
    • Choose Troubleshoot as an Administrator.

    Let us know if the steps above worked for you.
     
    Jennifer Bri, Aug 19, 2019
    #4
Thema:

Back to Basics: Windows Shutdown Autostart explained

Loading...
  1. Back to Basics: Windows Shutdown Autostart explained - Similar Threads - Basics Shutdown Autostart

  2. OneDrive no Autostart

    in Windows 10 Gaming
    OneDrive no Autostart: Hi all,Do not have a tickbox to start OneDrive automatically every boot in the settings see below:The only trick which helped was to put manually OneDrive in the Registry find on topic 4 "4. TWEAK REGISTRY FILES": Top 5 Ways to Fix OneDrive Not Opening on Startup in Windows...
  3. OneDrive no Autostart

    in Windows 10 Software and Apps
    OneDrive no Autostart: Hi all,Do not have a tickbox to start OneDrive automatically every boot in the settings see below:The only trick which helped was to put manually OneDrive in the Registry find on topic 4 "4. TWEAK REGISTRY FILES": Top 5 Ways to Fix OneDrive Not Opening on Startup in Windows...
  4. Autostart bearbeiten

    in Windows 10 Gaming
    Autostart bearbeiten: suche Funktionen von Autostart Programm https://answers.microsoft.com/en-us/windows/forum/all/autostart-bearbeiten/1f7fd369-2c53-4b3b-a0ed-57eda6a4d617
  5. Autostart bearbeiten

    in Windows 10 Software and Apps
    Autostart bearbeiten: suche Funktionen von Autostart Programm https://answers.microsoft.com/en-us/windows/forum/all/autostart-bearbeiten/1f7fd369-2c53-4b3b-a0ed-57eda6a4d617
  6. Autostart apps

    in Windows 10 Customization
    Autostart apps: How can I disable the word application automatically open when i turn on my machine? Sandra https://answers.microsoft.com/en-us/windows/forum/all/autostart-apps/dd1b2bcc-5d67-4109-abd4-e0fcdcb80459
  7. Autostart apps

    in Windows 10 Customization
    Autostart apps: How can I disable the word application automatically open when i turn on my machine? Sandra https://answers.microsoft.com/en-us/windows/forum/all/autostart-apps/cb5e6abe-52e9-4cf1-9b7b-3768815e1833
  8. Skype Autostarting

    in Windows 10 Software and Apps
    Skype Autostarting: I am finding Skype is auto-starting several times a day, without a re-boot. I have checked to see if it is enabled during booting and it is not. I have downloaded and used Autoruns, and there is no reference to Skype at all. There is no ability from within Skype to stop it...
  9. Skype Autostarting

    in Windows 10 Support
    Skype Autostarting: I am finding Skype is auto-starting several times a day, without a re-boot. I have checked to see if it is enabled during booting and it is not. I have downloaded and used Autoruns, and there is no reference to Skype at all. There is no ability from within Skype to stop it...
  10. Windows Store - Autostart on Boot or not?

    in Windows 10 Support
    Windows Store - Autostart on Boot or not?: I have two Windows 10 systems. One is a clean install (Nvidia GPUs) and one is an upgraded 8.0 to 8.1 install (Intel based graphics). On the clean install, the Windows Store opens on every boot and stays open. On the upgraded install, the Windows Store does not open. When...