Mount directories on SD into Libraries in Win 7

Discussion in 'Windows' started by BrandonMB, Oct 17, 2009.

  1. BrandonMB

    BrandonMB

    Joined:
    Jul 22, 2008
    Messages:
    51
    Likes Received:
    0
    When using Vista and XP on the AAO, I would always map a directory on my SD as My Documents for easy access to my files and what not. As others have likely noticed by now, this isn't as easy in Windows 7 with the new Libraries system. When attempting to add a directory from the SD card to a Library, Windows 7 comes back with "Cannot add removable media to Library". While I can't fathom the reason for this, it sort of fits into standard Microsoft logic. Ok,.. so what to do?

    Conveniently enough, Windows 7 includes built-in support for Virtual Hard Drives.

    First, create a directory on your SD where you want to store your VHD's.

    Then go to start, run, and enter diskmgmt.msc Your Disk Management Console will come up.

    You can then go to Action and create new Virtual Hard Drives. I created four, Documents, Music, Videos, and Pictures.

    You then have to Initialize and Format each of these drives. I formatted mine as NTFS, but feel free to choose the file system of your choice. I also chose 2GB as the size for each of these folders.

    You will now notice, once the initialization and formatting is complete, that each of these VHD's are now mounted in your My Computer as Hard Drives. Move your files and folders into these drives as appropriate.
    Now, go into your My Documents Library, and you will see in the top of the window that it includes X number of Locations. Clicking on this will allow youto add more locations to your library. Browse to the appropriate VHD and Voila, your My Documents folder now includes the files in your SD card.

    If people need assistance with the Initialization and formattig portion of this tutorial, let me know and I can walk you through it with more detail.

    You will notice that when you reboot, the directories are no longer mounted. I am heading out of the house at the moment, but will post the instructions on making the mounting of the VHD's permanent and to automatically remount them on reboot.
     
    BrandonMB, Oct 17, 2009
    #1
  2. BrandonMB

    BrandonMB

    Joined:
    Jul 22, 2008
    Messages:
    51
    Likes Received:
    0
    Step 2:

    Create a directory on your C: drive called s"scripts"

    Create a file called AttachPersistantDrives.CMD in the root directory of your C: drive and put the following text into the file: "diskpart /s c:\scripts\drives.txt
    ", then create a shortcut to this file in your start programs folder of your start menu.


    Now, in your newly created scripts folder, create a script.TXT file to contain the list of disks (VHD's) to be added, and include the following commands into the txt file, based on the number of virtual drives you created in Step 1.

    select vdisk file="z:\storage\<name of your first vhd file>.vhd"
    attach vdisk

    select vdisk file="z:\storage\<name of your second vhd file>.vhd"
    attach vdisk

    select vdisk file="z:\storage\<name of your third vhd file etc etc etc.vhd"
    attach vdisk

    I found that there were alot of dialogue boxes coming up when Windows booted, so I edited my UAC to the following settings

    User Account Control: Behavior of the elevation prompt for administrators in Admin Approval Mode - YES ELEVATE

    User Account Control: Turn on Admin Approval Mode -YES

    User Account Control: Switch to the secure desktop when prompting for elevation - disable (personal)

    Now reboot your system. When you log back into windows, you will notice that a command prompt window opens and starts to attach your drives for you. It takes some time to complete, I am working on ways of speeding that up now, but it does work. I would suggest changing your power profile to "sleep" when you close your lid, so that it wakes almost instantaneously in a usable state with your vhd's already mounted.
     
    BrandonMB, Oct 17, 2009
    #2
  3. BrandonMB

    BrandonMB

    Joined:
    Jul 22, 2008
    Messages:
    51
    Likes Received:
    0
    Step 3

    Now, go into your My Documents / My Music, etc folders that you want to add these new VHD's into. For example in "Music Library", you will notice right under the words Music Library that it shows the text "Includes: 2 locations". Clicking on the locations will bring up a dialogue window allowing you to add new areas to the library. Here, you will be able to add your newly created VHD's to the library, thereby mapping your My Music folder to an area on your SD drive!

    I know it's alot of steps, but it's easier than it looks!

    Thanks to Spydaz on sevenforums.com
     
    BrandonMB, Oct 17, 2009
    #3
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.