Unmount nas drive

I am modifying one of your scripts to suit my situation. I am mounting my NAS drive with:

mount volume “smb://CG-nas/homes” as user name "uname with password “pwd”

Everything goes well but when the script finished, I am left with the a drive on my desk top showing as “homes”. I drag that to the trash and it unmounts.

Could some one tell me how to unmount this in the script please.


tell application "Finder" to eject disk "home"

Thanks very much, works like a charm