Auto mount drives on Leopard with AppleScript

tell application "Finder"
	if exists disk "Shared_Vol" then
	else
		mount volume "afp://user@myserver.com/Shared_Vol"
	end if
	if exists disk "input" then
	else
		mount volume "smb://user:passw0rd@mywindowsbox.com/input"
	end if
end tell

To run it from command line or crontab:

osascript theAppleScript.scpt

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*