Automounting

I’ve created an automount script, which will mount my music drive, which is on my windows PC; this will create a drive on my Mac desktop when I boot up. That was easy to do.

This only works if the PC is up and running first.

However, if not, I get an error. What I’d like to know is how I can write this exception handle into the script. So when error appears, stop the script running. At the moment I have to click the dialogue box which appears.

Can anyone provide me with some direction?

#444326

What kind of script is it? Can we (or I) see the code? Does the PC have a consistent (assigned) IP address?

I don't have much experience with shell scripts, but this looks like an easy, doable task :).

-NC

#444394

The script is a .app file, and all I've done is added it to the start up sequence.

mount volume "smb://<Workgroup>;<My ID>@<Computername>/<Shared Folder>"

Just one simple line of code so far. I'm not using the PC IP address just to the workgroup name, but I suppose I could use that, but it won't be static, it's changed a few times in the past few months, probable because I've changed my router and added more PC's to the network.

#444411

Here's a possible solution: http://www.macosxhints.com/article.php?sto...070202190047133

Use the Automator method, which fails gracefully (i.e. if it can't connect, nothing is mounted and there are no error boxes).

Still, I'd also like to find a way to modify the code you provided. I'll look into it!

-NC

#444431

Good find NC. Can't wait to make life easier. ; )

#444435

Thanks for link. I'll try playing around with it to see if i can get it to work, so far no joy....the folder won't mount for some reason. I know it's something I'm doing wrong. :P

#444463