Matt Langtree

Leopard mount samba shares

by matt on Aug.05, 2008, under Mac OS X Hints, Rantings

I have created a basic apple script that offers the user feedback about the progress of mounting your network samba shares on Leopard.

  

To use this script, post it into Script Editor, update the relevant server and share variables.

Click the Run button to test the script out.

Once you are happy with your new script, choose File > Save.. and choose Application as the File Format, and check ‘Run Only’ from the options in the Save dialog box.

tell application "Finder"
  activate
  set theSharesCount to 3
  try
     display dialog "Mounting Share 1 of " & theSharesCount giving up after 1 with icon   note
     mount volume "cifs://WORKGROUP;matt@workserver/websites"
  end try
  try
     display dialog "Mounting Share 2 of " & theSharesCount giving up after 1 with icon note
     mount volume "cifs://WORKGROUP;matt@workserver/source"
  end try
  try
    display dialog "Mounting Share 3 of " & theSharesCount giving up after 1 with icon note
    mount volume "cifs://WORKGROUP;matt@workserver/admin"

  end try

end tell

:, ,
3 comments for this entry:
  1. matt

    This is a very temporary fix for mounting multiple samba shares. There are much more elegant solutions out there. :)

  2. David

    This is a great simple script. I work in multiple schools running Windows 2003 servers using my MacBook. Very simple and easy to mount multiple smb shares.

    Thanks for the Post

  3. matt

    Thanks for the feedback David, greatly appreciated.

    An interesting project is http://www.symonds.id.au/marcopolo/ . It will mount/unmount samba shares depending on different environment factors that it discovers.

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...