Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Share Settings Resetting after Reboot

03 Aug 2014   #1
Ratbert1009ca

Windows 7 Home Premium 64bit.
 
 
Share Settings Resetting after Reboot

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 System SpecsSystem Spec
.
04 Aug 2014   #2
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
04 Aug 2014   #3
Ratbert1009ca

Windows 7 Home Premium 64bit.
 
 

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 System SpecsSystem Spec
.

04 Aug 2014   #4
MilesAhead

Windows 7 32 bit
 
 

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 System SpecsSystem Spec
07 Aug 2014   #5
Ratbert1009ca

Windows 7 Home Premium 64bit.
 
 

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 System SpecsSystem Spec
07 Aug 2014   #6
MilesAhead

Windows 7 32 bit
 
 

When I do batch it's way simpler. So I'm not the one to debug it. Perhaps someone else can see something.
My System SpecsSystem Spec
Reply

 Share Settings Resetting after Reboot




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
folder settings randomly resetting
I have no idea why but I for some reason the settings I apply to specific folders have been getting reset at seemingly random times. By folder settings I mean sorting options mostly. I have to frequently re-select my pictures folder to have the option to sort by 'date created' and then select...
General Discussion
Wi-Fi settings keep resetting
Hi, I've got an annoying problem with my Wi-Fi settings in Windows 7. Recently I got myself a wireless D-Link router and a Realtek USB Wireless adapter for my PC. I had a bit of a problem setting it up due to annoying WEP/WPA keys and then I found the ASCII key option and got it working....
Network & Sharing
? about resetting IE 7 personal settings, etc.
I think I created problem w/brower IE7 from add-on & toolbars...Dumb ?: If i let system reset my setting will it affect other settings i.e., quicken financial files, bill paying files, or is this just exclusively browsing related? Thank you this is a wonderful site. Mt9
Browsers & Mail
Update Settings resetting after sysprep is run?
I am trying to keep the settings i have for Microsoft update (update everyday, 11:00Am, check for other microsoft updates etc.) I have everything configured as i need it, and then i run sysprep and it resets all of those settings. Any ideas?
Installation & Setup
Resolution Resetting after reboot??
My computer keeps lowering the resolution everytime its restarted. When i click detect it increases back to what it says the recommened resolution should be. Any ideas of what could be wrong? Pete
Graphic Cards
Rivatuner Fan Settings Resetting
So for some reason every time I restart the computer rivatuners settings default to direct control 30% even though I have auto control saved as the startup settings. How do I get this to stay on auto? Never had this problem in XP so I'm guessing it's a windows 7 thing.
Graphic Cards


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 06:20.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App