AppleScript to mount share: Not Working in Leopard!?!

mickey79

True Defiance
Ave,

I wrote a small AppleScript to mount network shares on share points. The scripts works fine in Panther (10.3) but does not work in Leopard (10.5).

Any clues how I can automate this following shell script:
(PS: I don't care if I use AppleScript, Automator, or something else - I just need to mount these share automatically on System Startup)

tell application "Finder"
try
do shell script "sudo -u www mount_smbfs -f 0777 -d 0777 //usr:pwd@192.168.1.2/Transfer /Library/WebServer/Documents/site/mounts/osm" password "pwd" with administrator privileges
activate
display dialog "Connecting to SHARE on SERVER
Please wait ..." buttons {"Cancel"} default button "Cancel" with icon caution giving up after 2
on error
-- do nothing
end try
try
do shell script "-u www mount_smbfs -f 0777 -d 0777 //usr:pwd@192.168.1.2/SHARE2 /Library/WebServer/Documents/site/mounts/idt" password "pwd" with administrator privileges
activate
display dialog "Connecting to SHARE2 on SERVER
Please wait ..." buttons {"Cancel"} default button "Cancel" with icon caution giving up after 2
on error
-- do nothing
end try

activate
display dialog "Connections to Foresight Established.
-TRANSFER Mounted!
-SHARE2 Mounted!"
end tell
 
Back
Top