|Are you using a Windows 2000, 2003 or 2008 server?|
Also are you running a Domain with Active Directory?
If so, within the \\servername\NETLOGON share create a login script. Simplest method is a batch file. Use net use Z: \\servername\share command to set mapped drive (sounds like you may already be doing this in your manual script).
You can then either set this login script to run by configuring the login script section of the Active Directory user account properties, or as I prefer, through the login script section of an Active Directory Group Policy. I find the latter more reliable.
Hope this helps.
IT Services Manager