Help with Script to mount SMB
Help with Script to mount SMB
- Subject: Help with Script to mount SMB
- From: "Ball, Dan" <email@hidden>
- Date: Wed, 14 Oct 2015 01:47:37 +0000
- Thread-topic: Help with Script to mount SMB
Hi all,
Hoping someone can help with this script? I have a small xcode app I made years ago that gives users a GUI to mount shares off of our servers. I opened it up here just to make some small changes and I’m noticing the on error part not working anymore. I know this used to work, but not sure when it stopped.
Script:
tell application "Finder"
try
mount volume "smb://server.apple.com/share"
on error
tell application "Finder"
activate
display dialog "I cannot locate share or you already have it mounted!" buttons {"Cancel"} default button "Cancel" with icon caution giving up after 10
end tell
end try
end tell
What I want the script to do is try and mount the share smb://server.apple.com/share and have it mount. If for some reason they try to mount it again which would be before throw an error and give a message to the user I cannot locate FacShare or you already have it mounted!
I copied the code out and into Script Editor to play with it and its still not working.
What am I missing?
Thanks,
Dan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden