+ Post New Thread
Results 1 to 2 of 2
Windows 7 Thread, "Shares" on local hard drive are lost when the drive is disconnected in Technical; The setup i have at home is I have one hard drive for the OS, and a separate HD where ...
  1. #1

    Join Date
    Aug 2007
    Posts
    847
    Thank Post
    106
    Thanked 66 Times in 47 Posts
    Rep Power
    27

    "Shares" on local hard drive are lost when the drive is disconnected

    The setup i have at home is I have one hard drive for the OS, and a separate HD where the whole drive is encrypted with truecrypt.

    When I login I have to enter the password and the encrypted drive then shows up in "My Computer"

    The problem is that i have 2 shared folders for my media centre, "Movies" and "Music"
    Everytime that the drive is re-added the shares get removed?

    The "shared" icon on the folder stays but when you look at the properties of the folder it is no longer shared???.

    Does anyone know why this is???, i dont think its win7 specific.
    Is there maybe a script that can setup a shared folder quickly?

    Thanks in advance

    Last edited by burgemaster; 28th June 2010 at 06:14 PM.

  2. #2

    Join Date
    Aug 2007
    Posts
    847
    Thank Post
    106
    Thanked 66 Times in 47 Posts
    Rep Power
    27
    I sorted this with a script if anyone ever has the same problem:

    The BAT script loads truecrypt, mounts the encrypted drive then calls a VBS Script to share the folders after the encryption password has been entered.

    BAT script:


    @echo off
    title Add Hard Drive
    echo ENTER PASSWORD into truecrypt.....
    @ "C:\Program Files (x86)\TrueCrypt\TrueCrypt.exe" /auto favorites /quit
    cls
    setup_shares.vbs

    setup_shares.vbs VBS script:

    Const FILE_SHARE = 0
    Const MAXIMUM_CONNECTIONS = 25

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

    Set objNewShare = objWMIService.Get("Win32_Share")

    errReturn = objNewShare.Create _
    ("g:\Music", "Music", FILE_SHARE, _
    MAXIMUM_CONNECTIONS, "Music share for XBMC")

    errReturn = objNewShare.Create _
    ("g:\Movies", "ovies", FILE_SHARE, _
    MAXIMUM_CONNECTIONS, "Movies share for XBMC")



SHARE:
+ Post New Thread

Similar Threads

  1. hard drive failed / data lost?
    By Wizzer in forum Hardware
    Replies: 24
    Last Post: 16th June 2011, 01:44 PM
  2. Wifi "USB Flash Drive" Stick
    By lasercat in forum Hardware
    Replies: 0
    Last Post: 4th March 2010, 02:11 PM
  3. "Missing" DVD drive
    By leco in forum Windows
    Replies: 10
    Last Post: 13th March 2008, 10:37 AM
  4. Replies: 1
    Last Post: 12th September 2007, 02:18 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •