Using a batch file via the Group Policy Editor
-
Press Windows + S on your keyboard to open the search box.
-
Type Local Group Policy Editor in the search box then press Enter to launch it.
-
Double-click the Windows Settings branch under User Configuration to expand it.
-
On the right pane, double-click Scripts (Logon/Logoff), then Logon. The Logon Properties dialog box appears.
-
Select Browse to choose the batch file that you had created earlier and then OK.
-
Select Apply then OK to exit the Logon Properties dialog box.