how to automate connection to server via smb or afp

to connect to a windows 2000 server either via “smb” or “afp” i´m in need of two scripts allowing me to automate the connection (kind of connection (smb or afp), user (who wants to connect) / volume to connect).
Is there already a script to do that? Or can anybody help me with the script?

My local dealer told me that this is not possible to do that with a apple-script!
But I can´t believe it!

Thank you![/b]

I know nothing about how to do it but according to what I’ve seen on various forums, the outcome might depend on how the server is configured.

– Rob

on run
tell application “Finder”
mount volume “smb://username:password@ip.address.here/volume”
end tell
end run

Just change the smb to afp if necessary. If you would like to mount on login, save as run-only and add to log-in items in system prefs. Not entirely secure, but if your a single user…

-NED

mount volume "afp://192.168.28.6/username/" as user name "your-username" with password "your-password"

Greg,

Is there a significant difference or a better reason to use yours ?
The one I posted works fine with both smb and afp, so i am curious.

-NED

Hi Jason, it’s what I use on my home network to connect to another OS X machine. I have it saved as an application, so all I have to do to connect to the other machine is a double click, then it connects and mounts the drive on my desktop. Since I’m behind a hardware router the IP addresses are always the same on the internal network. So it’s pretty hassle free and it always seems to work. Also it does not call the Finder, so it may be a little bit faster.