Apple script to connect to server

Joined
Feb 27, 2008
Messages
8
Reaction score
0
Points
1
Location
Cincinnati, Ohio
Your Mac's Specs
iMac, 20-inch, 2.0GHz Intel Core 2 Duo, 2GB RAM, 250GB HD, Leopard, 20" Dell Widescreen.
Ok, so we have a mac lab and need the students to be able to connect to the windows file server. No biggy I thought, I'll write an applescript that they can click on when they need to access the share........and it almost works.

Here's my script:

tell application "Finder"
try
mount volume "smb://IpAddressHere/fileserver/_building/hs%band"
end try
end tell



What is happening is that it is opening to the root of the share, not the folder that I want. Any hints?
 
Joined
Mar 30, 2004
Messages
4,744
Reaction score
381
Points
83
Location
USA
Your Mac's Specs
12" Apple PowerBook G4 (1.5GHz)
Make an alias of the folder you want.

The "mount volume" command does exactly that--it mounts a volume (the share.) There is no way to mount a folder (unless that folder is its own share.)
 
Joined
Jan 31, 2008
Messages
375
Reaction score
8
Points
18
Location
Chicago
Your Mac's Specs
2.53 Intel Core Duo Mac Mini; 4g RAM; 350g HD, OS 10.6.3
sort of similar to above, but once the volume is mounted to your desktop, you can drag that to your dock. from then on, all you have to do is click on the volume in your dock and it will automatically connect.
 
OP
T
Joined
Feb 27, 2008
Messages
8
Reaction score
0
Points
1
Location
Cincinnati, Ohio
Your Mac's Specs
iMac, 20-inch, 2.0GHz Intel Core 2 Duo, 2GB RAM, 250GB HD, Leopard, 20" Dell Widescreen.
Thanks, that worked....only one more question. After creating the alias, it prompts for my password. Most of the students are not smart enough to delete my name from the box and enter their own credentials, so they lock my account out when they type thier password under my name. Is there a way to keep the credentials blank?

Many appologies, I'm a mac newb who is used to being able to map a folder on the share in windows. I must admit that I've learned a great deal since I bought an imac to use at home.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top