remap network drive on a mac laptop

  • Thread starter TonyBaggaDonuts
  • Start date

T

TonyBaggaDonuts

I have a new mac laptop with the dual core intel (its sweet) and i
mapped a network drive at work, but when i unplugged it and returned
today, the drive assoc was gone.

i know i can check the little box in XP that remaps it on logon... is
there a way to reconnect at logon on Mac OS? or write a batch file to
be run on startup? if so, what is the syntax?

I'm a PC guru with slight mac experience.

Thanks.
Tony
 
Ad

Advertisements

W

William Smith

TonyBaggaDonuts said:
I have a new mac laptop with the dual core intel (its sweet) and i
mapped a network drive at work, but when i unplugged it and returned
today, the drive assoc was gone.

i know i can check the little box in XP that remaps it on logon... is
there a way to reconnect at logon on Mac OS? or write a batch file to
be run on startup? if so, what is the syntax?

I'm a PC guru with slight mac experience.

Hi Tony!

The simplest method would be to connect to the server and then drag the
icon into your Login Items in the Accounts System Preferences pane. If
your server allows, also save your password.

Optionally, you could put the following one-line string into an
Applescript, save it as an application and add that to your Login Items:

mount volume "smb://server.domain.com/share" as user name "userName"
with password "password"

Hope this helps! bill
 
T

TonyBaggaDonuts

Are the words 'as user name' & 'with password' functions of the script
language?

Another resource suggested this template:
+++++++++++++++++++++
tell application "Finder"

mount volume "smb://
workgroup;username:p[email protected]/sharename"

end tell
+++++++++++++++++++++

so i combined the two into this subtituting my domain info here:
+++++++++++++++++++++
tell application "Finder"

mount volume "smb://server.domain.com/share"

end tell
+++++++++++++++++++++
This makes sense to me. is it wrong? I dont like putting passwords in
scripts, id rather manually enter it once and add it to my keychain,
that'll work too, right?


NOW, what if i want to unmount... is the command 'unmount'?
 
W

William Smith

Hi Tony!

My comments are inline with yours...

TonyBaggaDonuts said:
Are the words 'as user name' & 'with password' functions of the script
language?

These are functions of the "mount volume" command, which is found in Mac
OS X's Applescript "Standard Additions".
Another resource suggested this template:
+++++++++++++++++++++
tell application "Finder"

mount volume "smb://
workgroup;username:p[email protected]/sharename"

end tell
+++++++++++++++++++++

The "tell application..." section isn't necessary. The "mount volume"
command isn't a command of the Finder. However, the syntax of the mount
volume line is also acceptable.
so i combined the two into this subtituting my domain info here:
+++++++++++++++++++++
tell application "Finder"

mount volume "smb://server.domain.com/share"

end tell
+++++++++++++++++++++

Again, the syntax of your "mount volume" line is acceptable, but it's
not the same thing as the one above. In the first example, you've
incorporated the Windows domain name and in the second you've
incorporated the fully qualified domain name of the server. These are
two different things.

The Windows domain name is used to help you authenticate to the server.
You're essentially saying, "Hi! I'm so-and-so from this domain."

The fully qualified domain name is used to fully name the server you
want to connect to. With this you're saying, "I want to use this server
in that company."
This makes sense to me. is it wrong? I dont like putting passwords in
scripts, id rather manually enter it once and add it to my keychain,
that'll work too, right?

It's probably wiser to put save your passwords in the Keychain. This
means, however, that your script isn't portable to another system. You'd
have to create a Keychain on each system. Not a big deal, though.
NOW, what if i want to unmount... is the command 'unmount'?

If you want to unmount a volume, simply drag it to the Trash or
right-click (or Ctrl + click) and "Eject".

Hope this helps! bill
 
Ad

Advertisements

T

T

William said:
If you want to unmount a volume, simply drag it to the Trash or
right-click (or Ctrl + click) and "Eject".

Hope this helps! bill

You were so close. The command is 'eject'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top