Deploying via Group Policy Object (GPO)
This method of deployment allows you to deploy the login script using your default Group Policy Object (GPO) or to a GPO that you have created. For clarity, this process has been documented in two stages:
If you do not already have a logon.bat file, or a logon.vbs file you should create one now.
The login script needs to be applied to the user configuration of a GPO and not the computer configuration.
Locate the logon scripts folder of the required GPO (in the Group Policy Object management console).
Open the logon.bat or logon.vbs file. If neither of these files is present, create one.
Add the script shown below into the BAT file:
Add the script shown below into the VBS file:
Save the logon.bat or logon.vbs file to the logon scripts folder of the GPO (as found in step 1).
The new GPO is updated for each user when they log off and back on. If you need to propagate the change before this is possible, type gpupdate in the Windows run field on that user's computer.