Go Back   The macosxhints Forums > OS X Help Requests > AppleScript



Reply
 
Thread Tools Rate Thread Display Modes
Old 12-05-2012, 10:01 AM   #1
deckyon
Prospect
 
Join Date: Dec 2012
Location: Louisville, KY
Posts: 13
Script to Mount Network Shares at Login without opening Finder Windows

Ok, I am able to mount the shares at login using the Login Items, however a finder window opens for each share, which, is annoying to have to go in and close each window (there are 7 in total). I would like to be able to mount the shares at login without having the Finder windows come up.

I have tried using the following in the Automator as a Shell Script, but it will not run, and is only showing the basic MAN Mount text in the error box. What is posted below it a generic version, user/pass and path changed.
Code:
mount volume "afp://John:doe@DiskStation._afpovertcp._tcp.local/Main"
deckyon is offline   Reply With Quote
Old 12-06-2012, 11:56 AM   #2
regulus6633
Major Leaguer
 
Join Date: Apr 2005
Posts: 477
First, your command is an applescript command, not a shell script command. That's why you're getting the error. So sticking with applescript, use this command and it won't open a folder...
Code:
mount volume "Main" on server "DiskStation._afpovertcp._tcp.local" as user name "John" with password "Doe"
And here's a full applescript. Save this as an applescript application and put it in your login items.
Code:
set mountedDisks to list disks
if "Main" is not in mountedDisks then
	mount volume "Main" on server "DiskStation._afpovertcp._tcp.local" as user name "John" with password "Doe"
end if
__________________
Hank
http://www.hamsoftengineering.com

Last edited by regulus6633; 12-06-2012 at 12:19 PM.
regulus6633 is offline   Reply With Quote
Old 12-06-2012, 12:18 PM   #3
deckyon
Prospect
 
Join Date: Dec 2012
Location: Louisville, KY
Posts: 13
Will give that a shot and let you know. Thanks for the code.
__________________
Thanks,
Deckyon

"Mac OSX. Because making UNIX user friendly is easier than fixing Windows."
deckyon is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting 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

Forum Jump



All times are GMT -5. The time now is 10:14 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.