Share lost when external drive unplugged and replugged

Discussion in 'Hardware' started by chookers, Oct 4, 2011.

  1. chookers

    chookers Staff Sergeant

    We have a 1TB drive plugged in via USB to one of the computers and shared it for access across the network. If it gets "unplugged" from the computer, when it's plugged in again, the share has been lost and we have to reshare and WAIT!

    Usually unplugging is caused by a problem that "kicks" it out and it has to be reattached. The usual, easiest method we use is just to unplug and replug the power cable for the drive.

    Is there any way around this problem? Any method of forcing it to connect without having to unplug anything that automatically puts the share back? I could experiment with this but it takes so darned long to set up the share again that I'd be at it most of the day or more so I'm hoping someone knows the answers and can just tell us what we need to know.

    Thanks!
     
  2. brownizs

    brownizs MajorGeek

    USB pocket drives are not made to be shared. If you want to share a drive on a network, get a NAS.
     
  3. techsent

    techsent Corporal

    attach the drive.
    open notepad and enter these example lines...

    net share Files \\dad-win7 /delete /y
    net share Files=H:\ /Grant:Everyone,Change
    pause

    modify dad-win7 to the computer name of the computer that the drive is attached to.
    modify H:\ to the drive letter that windows associates to the drive when it is connected to the computer.


    The first line further above, auto removes the previous existing share to clean things up.
    the next line below that, re-shares and sets up the share name as Files and grants the change permission to the everyone group.

    save the file on the desktop as share.bat
    execute the share.bat file to setup the share.
    disconnect the drive.
    reconnect the drive.
    execute the share.bat file to re-share again.

    Place a copy of the share.bat file into the Startup folder on the start menu so when the computer is rebooted, the share will be setup automatically.

    so in the future, when the drive is disconnected and then reconnected, execute the share.bat file.

    *once everything is working, remove the pause command from the entries as it is there temporarily so that you can see that the share is setup successfully.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds