How TO persistantly MOUNT VHD at BOOT TIME


  1. Posts : 34
    Windows 7 64-bit 7600 OEM
       #1

    How TO persistantly MOUNT VHD at BOOT TIME


    QUESTION:
    Scenario
    I have multiple VHD data Drives.. After attatching them in win7 every time i reboot they are gone and i have to Re-Attach them again.....

    Comment
    It seems a bit silly Why would microsoft do this... Hmmm..

    Question
    HOW CAN I HAVE THESE DRIVE AUTOMATICALLY Attached AT LOGON!
      My Computer


  2. Posts : 34
    Windows 7 64-bit 7600 OEM
    Thread Starter
       #2

    Ok I forgot about this posting... SORRY!

    diskpart /s c:\scripts\drives.txt

    we create a file called AttachPersistantDrives.CMD with the above text and create a shortcut in the start folder in the menu of your user.


    then we create a script.TXT file to contain the list of disks to be added

    select vdisk file="z:\storage\Application Library.vhd"
    attach vdisk


    select vdisk file="z:\storage\Music Library.vhd"
    attach vdisk


    select vdisk file="z:\storage\video library.vhd"
    attach vdisk


    I found that there was a lot of boxes coming up on screen, SO. I edit Local Security policy.

    And Made Minor changes to User Acount Control. As We DONT WANT TO TURN OFF THIS FEATURE.... I have Exported the security poilcy to a VhdSecpolicy.INF to imported For ease later.

    LOCAL POLICES / SECURITY OPTIONS /
    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 when i logon All My Vhds Logon TOO. In their specified order AND able to be added to Libraries... <my drives always get the same Letters Now. although i should be using folder mounts instead> If I am Not logged on then My Librarys are unavailable!<my drive are not attached>

    So You Can And Should Manage files better and even Protect Files From Evil Antivirus softwares with Hidden agendas to delete "SPECIFIC SOFTWARE" from your pc,even when NOT VIRUSED UP!... also easier to Scan whole system as not so much files unless all the Vhd's are attached...
      My Computer


  3. Posts : 1
    Windows 7 Home Premium x64
       #3

    Hi,

    I've tried your advice on both Windows 7 x64 Home Premium and Professional and it's not working. All I am receiving is "DiskPart has encountered an error: The system cannot find the path specified. See the System Event Log for more information."

    The VHD I'm trying to attach is on an external harddrive connected to my router. The only way I can attach it right now is through the disk management GUI. The command prompt version doesn't work at all.

    EDIT: For remote drives you need to give a UNC path and not a mapped drive e.g. \\COMPUTER\backup.vhd.
    Last edited by Sydero; 06 Oct 2010 at 15:27.
      My Computer


  4. Posts : 260
    Windows 7 Ultimate 64bit
       #4

    sorry for hijacking but figured y'all might be in the know...

    My experience is that Josip Medved's VHD Attach is the quickest method I've found so far.

    After re-reviewing comments in How to Create Scheduled Task to attach volume, it seems that the Administrators group required permissions advice given is incorrect, but that 'System' will work.

    When I use the batch method I can stamp a log

    Code:
    echo %date% %time% startedScript >> D:\log.txt
    diskpart /s "D:\vhd\attachLBS.txt" >> D:\log.txt
    ECHO. >> D:\log.txt
    echo %date% %time% finishedScript >> D:\log.txt
    Code:
     
    17/10/2015  0:25:11.55 startedScript 
    
    Microsoft DiskPart version 6.1.7600
    Copyright (C) 1999-2008 Microsoft Corporation.
    On computer: DELHIBOY
    
    DiskPart successfully selected the virtual disk file.
    
    
      100 percent completed
    
    
    DiskPart successfully attached the virtual disk file.
     
    17/10/2015  0:25:31.66 finishedScript

    I'm looking at VHD Attach, and wondering a) if there's a log that shows when a volume was mounted (or if that can be inferred), to compare with when the VHD Attach svc starts (& what else happens @ boot>startup>loginscreen>login)

    Any way of identifying WHEN a volume was mounted?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About 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 02:33.
Find Us