• Shared Drive No Longer Shared after Reboot

    Home » Forums » AskWoody support » Windows » Windows 7 » Questions: Windows 7 » Shared Drive No Longer Shared after Reboot

    Author
    Topic
    #464878

    I have a 1 TB external USB drive connected to my Win7 machine that I share with the other two computers in my home network. We use this to store our data, music, videos, etc. Every time I reboot the Win7 machine the drive is no longer shared. I have to go back in and share it again. How does one make the sharing survive a boot?

    Thanks.

    Viewing 3 reply threads
    Author
    Replies
    • #1192044

      I suspect that Windows is looking at your shares before the external drive is initialized, and since it the drive is not yet available, the shares are disconnected. Quick fix would be to write a small script or batch and put it in the startup. Take a look at the NET command. A batch with a line something like

      NET SHARE MySharedPhotos=G:Photos /GRANT:everyone,FULL

      Would recreate the share every boot, as long as your external drive is on and assigned the same drive letter each time (ie: if you boot with a flash drive in, Windows may assign the flash G and the external H)

      Anyhow, just a thought. Post back if you need more help,

      Cheers,

      NH

      • #1192076

        I suspect that Windows is looking at your shares before the external drive is initialized, and since it the drive is not yet available, the shares are disconnected. Quick fix would be to write a small script or batch and put it in the startup. Take a look at the NET command. A batch with a line something like

        NET SHARE MySharedPhotos=G:Photos /GRANT:everyone,FULL

        Would recreate the share every boot, as long as your external drive is on and assigned the same drive letter each time (ie: if you boot with a flash drive in, Windows may assign the flash G and the external H)

        Anyhow, just a thought. Post back if you need more help,

        Cheers,

        NH

        Thanks for the info. I haven’t written any batch files since the DOS days and am not sure exactly how to word this one. The drive is assigned drive letter J: and that is the one that shows up each time. I want the whole drive shared. It is mapped as J: on the other computers as well.

        I spent some time looking at NET and wrote a batch file. I tried it and it worked. I then added it to Startup. I just rebooted the system and the drive is shared. I saw the batch file pop up the Command prompt and execute, so I suspected it would work. This solves a major problem for me. Thanks.

        • #1192139


          I spent some time looking at NET and wrote a batch file. I tried it and it worked. I then added it to Startup. I just rebooted the system and the drive is shared. I saw the batch file pop up the Command prompt and execute, so I suspected it would work. This solves a major problem for me…

          I have a VERY similar BAT file that shares a drive that is not available at boot time. My BAT file seems to trip up the Windows 7 UAC stuff and it just won’t run from the Startup folder.

          Have you done anything to disable UAC?

          • #1192167

            I have a VERY similar BAT file that shares a drive that is not available at boot time. My BAT file seems to trip up the Windows 7 UAC stuff and it just won’t run from the Startup folder.

            Have you done anything to disable UAC?

            UAC is on and set at the default level. I haven’t made many changes at all to anything. I wonder if it is because this is a USB drive? The batch file runs after I log in. It ran for me from the Command prompt with no trouble either. I don’t know if it makes a difference, but I am running Home Premium.

            • #1192185

              I would love to know what it would take for my BAT file to run from the Startup menu :shrug:

              I assume that you have created a shortcut to the BAT file in your startup folder, where is the BAT file itself?

            • #1192231

              I would love to know what it would take for my BAT file to run from the Startup menu :shrug:

              I assume that you have created a shortcut to the BAT file in your startup folder, where is the BAT file itself?

              The bat is located in c:usersgeorge and is named dshare.bat. Like you said I created a shortcut in the startup folder. I just opened notepad typed in: NET SHARE J=J: /GRANT:everyone,FULL hit Enter and saved it. To test I went to sharing on the J drive and unchecked Share this folder in Advanced Sharing. I then tested from one of the other computers and found that I could not access the drive. I then went to the Command prompt and ran the bat. I went back to sharing and found Share this folder was checked. I accessed the drive from the other computers with no difficulty. I then restarted the computer. After I logged in I saw the Command prompt window flash by. I then checked and the Share this folder box was checked and the other computers could access the drive.

              BTW: I am Administrator on the computer.

            • #1192377

              Thank you.

              If I ever work out why this doesn’t work for me then I will post a follow up explanation

            • #1194952


              If I ever work out why this doesn’t work for me then I will post a follow up explanation

              I haven’t worked out why my BAT file in the startup folder doesn’t run, but I have a perfectly good workaround.

              The task scheduler in Windows 7 has a lot more options than in earlier versions, so I have created a scheduled task that runs my BAT file, as an administrative user, 30 seconds after anyone logs in.

    • #1192070

      …Every time I reboot the Win7 machine the drive is no longer shared….

      The simple solution would seem to be to always make sure that the Win7 machine boots before the other two. from what you say, it is not clear why this does not happen.

    • #1192443

      Glad that worked for you. Another tip would be to go into the properties of the shortcut to your batch file and set it to Run: Minimized. Now the cmd window won’t be as distracting after you login, it will just show on the task bar for a second or two.

      Cheers,

      NH

    • #1194981

      The problem with external drives they may NOT always be the same drive letter when a reboot is done, true MOST of time yes they are. I have also had some that will hang the boot just after the BIOS is read and then will time out and continue with the boot and not be connected until Windows is fully started.

      This is a very good reason for NOT sharing a external drive, but to use a large internal drive for shared storage.

      DaveA I am so far behind, I think I am First
      Genealogy....confusing the dead and annoying the living

    Viewing 3 reply threads
    Reply To: Shared Drive No Longer Shared after Reboot

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: