Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

thirdkind

macrumors regular
Original poster
Oct 20, 2005
109
26
Columbus
I created an .app using Script Editor that automagically mounts a Windows share on my network. Here's the script, which I grabbed from macosxhints.com:

Code:
[b]
tell application "Finder"
	activate
	
	try
		mount volume "smb://NETWORK;username:password@computer_name/share_name"
	end try
	
end tell
[/b]

Mounts share_name just fine. I also created an Automator .app to grab files from this share daily and copy them to the external Firewire drive hooked up to my Mac.

First issue is that the share keeps mysteriously disappearing. I'll go to bed with the share mounted and wake up to find it gone from the desktop. The share is on a PC that's active 24 hours a day; it never goes to sleep.

Since the share mysteriously unmounts, my backup fails.

Second issue: I tried adding the mounting script as the first item in the Automator backup.app so it runs before the copying actions, but that item fails and causes the whole backup.app to fail.

Any idea what foolishness is going on or what I might be doing wrong?
 

thirdkind

macrumors regular
Original poster
Oct 20, 2005
109
26
Columbus
Thanks for the link. Getting the drive to mount at startup doesn't seem to be a problem though. It's keeping it mounted that's proving elusive.
 

matticus008

macrumors 68040
Jan 16, 2005
3,330
1
Bay Area, CA
Does your Mac go to sleep in between? Network shares aren't consistently preserved across sleep cycles, so you might have to mount them again. I don't really like the way Finder does Network shares...it's cumbersome and fickle. Sometimes, the icon will stay, but the connection stops. In many ways, it's a Samba problem.
 

thirdkind

macrumors regular
Original poster
Oct 20, 2005
109
26
Columbus
kingjr3 said:
Thats why I was thinking it may have to do with how you are mounting the drive. Trying it wouldn't hurt.

I didn't realize the mounting method had an effect. I'll give it a shot, thanks.

matticus008 said:
Does your Mac go to sleep in between? Network shares aren't consistently preserved across sleep cycles, so you might have to mount them again. I don't really like the way Finder does Network shares...it's cumbersome and fickle. Sometimes, the icon will stay, but the connection stops. In many ways, it's a Samba problem.

No sleeping on the Mac or the PC hosting the share.

During general use I don't really care too much since I have the mounting .app on my Dock; I just click it and go if it disconnects. But I'm trying to be vigilant about regular backups these days (I never was before), and the share's disappearing act is cramping my new style.
 

jeremy.king

macrumors 603
Jul 23, 2002
5,479
1
Holly Springs, NC
thirdkind said:
I didn't realize the mounting method had an effect. I'll give it a shot, thanks.

I read somewhere that there is a difference between static mounts (automount) and semi-static (finder based mounting)...Static should keep the mounts alive between sleep cycles, etc...

Of course, I also may have no idea what I am talking about, so take it with a grain of salt...
 

thirdkind

macrumors regular
Original poster
Oct 20, 2005
109
26
Columbus
I found a solution that works better for some reason. Instead of saving the AppleScript that mounts the share as an .app and opening that as the first Automator step, which didn't work, I plugged the AppleScript directly into Automator as the first step. Works just fine now.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.