Mac

Mount Up

Posted in Information Technology, Mac on October 28th, 2009 by Jon Edmiston – 1 Comment

As a part of my transition to the Mac I’ve been try to dig deep into OSX to learn as much as possible. One thing I’ve been wanting to solve is mapping all of my typical shared drives at login. After searching and searching I was able to piece together this AppleScript that will mount of of my shares:

tell application “Finder”
try
mount volume “smb://ccvonline.com;jedmiston:xxxxx@ccvfs1.ccvonline.com/Creative Technologies_ccvfs”

on error
display dialog “There was an error mounting the volume Creative Technologies.” & return & return & ¬
“The server may be unavailable at this time.” & return & return & ¬
“Please inform the Network Administrator if the problem continues.” buttons {“Okay”} default button 1
end try

try
mount volume “smb://ccvonline.com;jedmiston:xxxxxx@ccvfs.ccvonline.com/home/jedmiston”

on error
display dialog “There was an error mounting the volume home.” & return & return & ¬
“The server may be unavailable at this time.” & return & return & ¬
“Please inform the Network Administrator if the problem continues.” buttons {“Okay”} default button 1
end try

try
mount volume “smb://ccvonline.com;jedmiston:xxxxx@ccvfs.ccvonline.com/30 Day Drop”

on error
display dialog “There was an error mounting the volume 30 Day Drop.” & return & return & ¬
“The server may be unavailable at this time.” & return & return & ¬
“Please inform the Network Administrator if the problem continues.” buttons {“Okay”} default button 1
end try

end tell

(be sure to substitute your password in place of the xxxxx’s)

Save this script as and Application and set it as one your your ‘Login Items’ and your ready to roll.