Windows provides a set of policy-driven user logon, user logoff, computer startup, and computer shutdown scripts that you can manage by using the Group Policy snap-in.
Scripts (Startup/Shutdown) Use this extension to specify the scripts that run when you start and shut down the computer. To configure the computer startup and shutdown scripts, start the Group Policy snap-in, expand Computer Configuration\Windows Settings, click Scripts (Startup/Shutdown), and then in the right pane, double-click the script that you want to configure. These scripts run with the Local System account.
Scripts (Logon/Logoff) Use this extension to specify the scripts that run when a user logs on or logs off the computer. To configure the user logon and logoff scripts, start the Group Policy snap-in, expand User Configuration\Windows Settings, click Scripts (Logon/Logoff), and then in the right pane double-click the script that you want to configure. These scripts run with the User account and not on the Administrator account.
--please don't forget to upvote
and Accept as answer
if the reply is helpful--