Why do my Windows shares keep magically disappearing?

Discussion in 'Mac Basics and Help' started by thirdkind, Nov 2, 2005.

  1. thirdkind macrumors member

    Joined:
    Oct 20, 2005
    Location:
    Columbus
    #1
    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?
     
  2. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #2
  3. thirdkind thread starter macrumors member

    Joined:
    Oct 20, 2005
    Location:
    Columbus
    #3
    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.
     
  4. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #4
    Thats why I was thinking it may have to do with how you are mounting the drive. Trying it wouldn't hurt.
     
  5. matticus008 macrumors 68040

    matticus008

    Joined:
    Jan 16, 2005
    Location:
    Bay Area, CA
    #5
    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.
     
  6. thirdkind thread starter macrumors member

    Joined:
    Oct 20, 2005
    Location:
    Columbus
    #6
    I didn't realize the mounting method had an effect. I'll give it a shot, thanks.

    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.
     
  7. jeremy.king macrumors 603

    jeremy.king

    Joined:
    Jul 23, 2002
    Location:
    Fuquay Varina, NC
    #7
    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...
     
  8. thirdkind thread starter macrumors member

    Joined:
    Oct 20, 2005
    Location:
    Columbus
    #8
    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.
     

Share This Page