I had a script running in OS 9.0.4 to mount volumes by the following
mount volume "afp://name:password@ipaddress/volume"
This worked fine until I upgraded to OS 9.1. After upgrading I tried the script and got a strange error. I didn’t write it down so I’m not exactly sure what it was but it changed the “mount volume” part to something like “<>” So I upgraded Applescript to 1.8.3 which also required a newer CarbonLib (1.6). After applying these updates and running the script I now get a “Network File Permission Error.”
Anyone know what changed from 9.0.4 to 9.1 that would cause this error?
Thanks for the reply Mytzlscript but I still get a “Network file permission error” with the new syntax. Did something change with the way networking works in 9.1?
mount volume "afp://server.IP.address/Volume Name" as user name "username" with password "password"
this should work if you have the correct info: try making sure the IP address, Name of the Volume you are Mounting, User Name, and Password are correct.
Also, make sure you don’t already have it mounted.
mount volume "afp://name:password@ipaddress/volume"
Huh, weird. I am able to use the code above to mount a volume on OS 8.6, and 9.2.
I did get an error -5016 once but noticed I had the volume name wrong - fixed it and it was fine. I also made sure I didn’t have any other mounting scripting additions in my Scripting Additions folder.
I am unable to test on anything earlier than 8.6 - sorry. I don’t even think the mount volume command is supported pre 8.5 or 8.6. I don’t mean this to sound belittling but are you sure the volume you are trying to mount has file sharing on and are you sure your code looks like:
mount volume "afp://Username(not case sensitive):password (is case sensitive@172.28.119.00/Name of shared volume"
The only other thing I can think of to check is put the URL into your browser and see if you can connect to it from there, or from the Chooser, click ‘Server IP Address’ and try there. If you are unable to from the Chooser, your problem is with the server station and not your syntax.
I finally got it to work. No matter what I tried the following code would not work
mount volume "afp://server.IP.address/Volume Name" as user name "username" with password "password"
After browsing the Applescript discussions on Apples website I found a post that said to try it like this:
mount volume "Volume" on server "Server Name" as user name "User" with password "Password"
The difference here is I used the name of the server instead of its IP address. No matter what format I used if I tried it with the IP address I’d get either a “Network file permission error” or a -5016 error. Using the servers host name worked fine.
Not sure it works one way and not the other but it works now and that’s all that matters.