How do I use apple script to mount a volume as a diffrent name?

Posted on 2009-02-19
Last Modified: 2012-05-06

    I am trying to get my windows 2003 Servers share point to mount on my client macs (all running 10.5.6) with a different name then the folder that is shared.  so to clairfy, if I mount currently via Afp in finder, the Volume that appears on the desktop is "Share" , I would like ti to be the same as our PC users with "Z-Drive".  I have attached my apple script, bellow.  If there is a way of doing this with "do shell" and triggering a bash shell would also be great.
tell application "Finder"


		set tst_ping to (do shell script "ping -c 1 ny575fs1 | tail -1")

		if "100% packet loss" is not in tst_pingt then

			mount volume "afp://transfer/share"  Test


		end if

	end try

end tell

Open in new window

Question by:plumtv
    LVL 32

    Expert Comment

    You need to mount the volume in a folder with the name of your choice.

    Author Comment


       Thank you for your response, I guess the question is really then:

       How can I mount a Network volume, to a folder of my choice using AppleScript. If i have to do a "do script"  statement i would need to pass a sudo with password and would like to avoid that if possible.
    If that is the case, could you please include a sample bash command on doing that (bash aint' my bag)

    Thank You  Again


    Accepted Solution

    I resolved this by writing a block of apple script to test if the keychain for the network share is in place, and if not to prompt the user for  L/P and then create the keychain, then mount as needed.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
    In this article we discuss how to recover the missing Outlook 2011 for Mac data like Emails and Contacts manually.
    This video discusses moving either the default database or any database to a new volume.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now