Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > applescript question [smb share automount script]

applescript question [smb share automount script]
Thread Tools
Fresh-Faced Recruit
Join Date: Oct 2003
Location: Austin, TX
Status: Offline
Reply With Quote
Feb 24, 2004, 04:09 PM
 
I found an applescript to automaount smb shares, and was hoping for some help with it.

the script is:
====
tell application "Finder"


open location "smb:// user : password @ computername / sharename"


end tell
=====

is there a way to make it so when the location is opened, it doesn't open the window in the finder? I just want the smb share mounted, that's all.

and to give credit where its due, I found the script @ http://unxmaal.com/mt/archives/001897.php
     
Professional Poster
Join Date: Oct 2001
Location: London
Status: Offline
Reply With Quote
Feb 25, 2004, 05:06 AM
 
Code:
open location "smb:// user : password @ computername / sharename" tell application "Finder" close front window end tell
Not exactly what you were looking for, but the window doesn't remain open.

[edit] - just remembered something...

Try adding a trailing slash after the end of the URL - This may mount the drive without opening the window (maybe that's just AFP though...)

[edit2] - even better use the Mount Volume Command:

Code:
mount volume "smb://user:pass@host/share"
(you don't even need to target the Finder)
(Last edited by Diggory Laycock; Feb 25, 2004 at 05:18 AM. )
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:36 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2