RE: Will mount volume EVER work the way it is supposed to?
RE: Will mount volume EVER work the way it is supposed to?
- Subject: RE: Will mount volume EVER work the way it is supposed to?
- From: "Stockly, Ed" <email@hidden>
- Date: Mon, 23 Jul 2001 15:08:16 -0700
>
>>> Every now and then I run into a situation where I see that it would be
>
>>> terrific if I could mount an AppleShare volume using AppleScript.
>
>>> And each
>
>> JR,
>
>> I am surprised about your writings, as I am using a script to mount
>
>> servervolumes using applescript over TCP/IP without problems.
>
>>>Not that this helps you much but I use AppleScript to mount volumes too.
>>An eg:
>>mount volume "web" on server "web" as user name "" with password ""
>>Works fine ever half hour.
Me too! I have found that using Mount volume on our network is more reliable than double-clicking on a network alias or even using the chooser to mount volumes. (Double clicking on a network alias results in a delay of over one minute if the volume is not mounted and the chooser tries to do a verify of the network connection which the user must cancel (twice) to continue without a long delay).
I believe there are several factors that can affect this command working. Your AppleTalk control panel needs to be pointed to your network connection (Ethernet/airport or whatever) as does your TCP/IP control panel. Mount volume won't override these settings.
Also, with mount volume you can provide either the IP address of the server to mount the volume over IP or the AppleTalk zone info for the server to mount the volume using AppleTalk. I prefer IP. (Doesn't everyone?)
Anyway, the script below is what I use and it works on all Macs on our network using 8.6 through 9.1.
---------------
property myPassword : "UserPassword"
property myUsername : "UserName"
property myVolume : "VolumeName"
property myServer : "ServerName"
property myZone : "AppleTalk Zone"
property volumeIpAddress : "afp://111.11.111.11/VolumeName"
try
ignoring application responses
mount volume volumeIpAddress as user name myUsername with password myPassword
end ignoring
on error
mount volume myVolume ,
on server myServer ,
in AppleTalk zone myZone ,
as user name myUsername ,
with password myPassword
end try
----------------
I wouldn't be surprised if the "ignoring" block doesn't eliminate a number of problems.
In fact this script has been so reliable that I haven't had occasion to go into it and rewrite it to concatenate the IP address and the Volume name so that info doesn't have to be entered twice. I even encourage my users to put it in their startup disk rather than click the button in the chooser to open volumes at startup.
HTH
ES