Share Settings Resetting after Reboot

Ratbert1009ca

New member
Local time
4:51 PM
Messages
6
Hi I recently got an Win7 Home Premium Desktop. I also had some external USB HDD's which I am attaching to the desktop computer. The problem is the share settings on these external USB drives do not stick, and resets whenever I reboot, and reverts back to not shared.

I have narrows it down to that fact that the USB drives seems to get mounted with a significant enough of a delay that somehow the system looses the share settings. This problem does not happen with the built-in internal HDD, nor did this occur when I had the external USB HDD's on a WinXP system.

Is there any way to overcome this issue?
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Home Premium 64bit.
CPU
AMD X6 FX-6300
Motherboard
MSI 970A-G46
Memory
8 GB RAM
Graphics Card(s)
Sapphire Radeon R7 265 2GB GDDR5
Hard Drives
1 TB HDD
Antivirus
Norton
As an experiment try getting the external drives working correctly. Then eject them and kill the power to the drives. Reboot. Power up the drives. See if the shares are still intact.

I used internal drives in USB docking stations. I powered down the docks before shutting down or rebooting. Then powered them up after login. The share settings held up very well.

If the power off technique works then you may need to use batch files with Net Use statements to map drives instead of the automatic reconnect method.

Edit: It's a good idea to use something link sync.exe from SysInternals to flush the drive buffers before powering them down.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Thanks for the suggestion. I tried what you recommended. The interesting thing is it won't let me eject the volume that I had set to share saying its in use (but I know no one else is using the volume). But I can eject the others I havent set the share permissions on.

I also tried to just unplug the volume without ejecting and then plugging it back in. The computer in that case, remounts the volume and the share setting comes back as it was.

So it seems it only looses the share settings when the computer itself reboots, AND encounters a delay in the mounting process which is always under Windows 7, that didnt occur under WinXP.

Does any of that make any difference? I mean I can make a script to configure the sharing as you suggested, but would be nice if I didnt have to, and to figure out why this occurs.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Home Premium 64bit.
CPU
AMD X6 FX-6300
Motherboard
MSI 970A-G46
Memory
8 GB RAM
Graphics Card(s)
Sapphire Radeon R7 265 2GB GDDR5
Hard Drives
1 TB HDD
Antivirus
Norton
Ok, I suggested eject to be on the safe side. But as you point out, it won't do it while shared. What I did with my docking stations is wait for drive activity to stop. Then run sync.exe to flush the disk buffers. Then I would power down the docks. On boot I would run the batch with net use statements etc..

I did notice with my external Seagate FreeAgent USB 2.0 that I could leave it plugged in wih Vista. But W7 didn't like that so much. So I plugged it back into the Vista machine.

I don't know if there's a way to get rid of the W7 latency with externals. And this drive was set to never spin down until the machine shut down. Have you looked on forums of the particular drive maker? Often brand specific work-arounds can be found there.

The only other thing I might try is setting the network services to Automatic(Delayed Start) and see if that gives the drives a chance to spin up.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Here's what I ended up doing in case anyone wants to know.
I put a batch file in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup
The batch file has the following code:

Code:
@echo off 
cls

echo Setting Up External Drive Share.
echo off 

setlocal

set counter=0
:archivesharing
if exist "Z:\" (
  echo Z:\ Drive exists.
  echo off 
   
  net share Archives /DELETE
  echo Set Archives Share
  net share Archives=Z:\ /GRANT:Everyone,FULL
  
) else (

  echo Waiting for Archives to Mount.
  timeout /t 1
  set /A counter = %counter% + 1
  if %counter% leq 120 (
  goto :archivesharing
  )

)
endlocal

However, I want to do the following instead:

Code:
@echo off 
cls

echo Setting Up External Drive Shares.
echo off 

setlocal

set counter=0
:archivesharing
if exist "Z:\" (
  echo Z:\ Drive exists.
  echo off 
  set sharestate=net view desktopw7 | findstr "Archives" 
  if "%sharestate%" equ "" (
  echo Set Archives Share
  net share Archives=Z:\ /GRANT:Everyone,FULL
  )
) else (
  echo Waiting for Archives to Mount.
  timeout /t 1
  set /A counter = %counter% + 1
  if %counter% leq 120 (
  goto :archivesharing
  )
)
endlocal

The problem though is
Code:
 set sharestate=net view desktopw7 | findstr "Archives"

Doesn't seem to assign the sharestate value properly and is always blank. Any ideas on why that is?
I've tried a bunch of other ways to assign this variable using for loop, tmp file etc but that variable refuses to have any values assigned to it other then simple numbers.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Home Premium 64bit.
CPU
AMD X6 FX-6300
Motherboard
MSI 970A-G46
Memory
8 GB RAM
Graphics Card(s)
Sapphire Radeon R7 265 2GB GDDR5
Hard Drives
1 TB HDD
Antivirus
Norton
When I do batch it's way simpler. So I'm not the one to debug it. Perhaps someone else can see something.
 

My Computer

Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top