• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1309
  • Last Modified:

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


    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

  • 2
1 Solution
You need to mount the volume in a folder with the name of your choice.
plumtvAuthor Commented:

   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

plumtvAuthor Commented:
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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now