Quick Tip: How to Mount a Time Machine Network Drive at Login When i used the script exactly the same (of course the path has to be changed accordingly), it was throwing out errors like directory not found, image not recognized etc. What i did was i went back to basically running the script one by one the terminal and saw how it came about. So here below is the final script to make it happen:
tryThen, do these;
mount volume "smb://servername/dir" end try
do shell script "hdiutil attach /Volumes/dir/filename.sparsebundle"
Applescript Editor -> Export as App to Documents -> Drag and drop to Login Items
Try restarting the server and verify if the .sparsebundle is mounted automatically.