Re: Connect to SMB server
Re: Connect to SMB server
- Subject: Re: Connect to SMB server
- From: Bruce Carter <email@hidden>
- Date: Fri, 16 Jan 2004 08:34:20 -0500
Here's what I use at ND to mount students' institutional filespace:
on run
try
set username to do shell script "echo $USER"
end try
-- display dialog username
try
tell application "Finder"
mount volume "smb://fs.nd.edu/~" & username as user name username
end tell
display dialog "IFS NetFile space (also known as the N: drive) will
appear on your desktop as ~" & username & "." with icon note
tell application "Finder"
try
reveal folder ("Macintosh HD:Volumes:~" & username & ":Private")
end try
end tell
on error errorMsg number errorNum
if errorNum = -128 then
-- user cancelled
else if errorNum = -36 then
display dialog "IFS NetFile space could not be mounted, wrong
password or password is not synchronized (see:
https://password.nd.edu)." buttons {"Cancel", "Go to Password
Maintenance Page"} default button 2 with icon stop
if button returned of the result is "Go to Password Maintenance
Page" then
open location "
https://password.nd.edu"
end if
else if errorNum = -47 then
display dialog "IFS NetFile space is already mounted." with icon stop
else if errorNum = -5000 then
display dialog "IFS NetFile space could not be mounted, no such
user." with icon stop
else
display dialog "IFS NetFile space could not be mounted." & return &
errorMsg & return & errorNum with icon stop
end if
end try
end run
On Jan 16, 2004, at 6:27 AM, Adalberto Teixeira wrote:
I have an iBook and work in an office which uses a Windows 2000
server. I connect to it by connecting to server smb://xxx.xxx.xx
through the Finder's Connect to Server command, inserting username and
password and then by mounting a volume. I've tried to write a script
to speed the operation but there doesn't seem to be, in the Finder or
the System Events dictionaries, a command which allows me to connect
to a server other than AppleTalk. Can anyone enlighten me on this?
--
Bruce Carter, ACTC, MacCSE, MCP
http://www.nd.edu/~bcarter/
Senior Systems Engineer
mailto:email@hidden
Riley Hall of Art, Room 217 AIM:bcarteratnd
University of Notre Dame +1 574 631 2967 Voice
Notre Dame, IN 46556-0539 +1 574 631 8201 FAX
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.