As factory909 mentioned you could do this with Active Directory + Group Policy. You could create a group policy object and associate it with the organizational unit/domain for the department you want. Then in the group policy editor, browse to [User Configuration] -> [Windows Settings] -> [Scripts (logon/logoff)]. You will find the logon scripts settings on the right.
The last section of the following article might help: