How can I keep a VHD image mounted after reboot?

RoadToNever

New member
Local time
11:39 PM
Messages
4
How can I keep a VHD image mounted after reboot?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
I'm sure there's a CLI command for this.

Depending on when the VHD needs to be mounted (before or after login), put it in a startup script, or as a batch file in your (or "all users") startup folder.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
Can you point me to one of those scripts?
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
Sure. I think this will help:
http://www.virtues.it/2010/07/howto-diskpart/

Basically you put a bunch of diskpart commands in a file, and feed that to diskpart. And it turns out that diskpart can mount VHD's.

Note that this probably has to be executed with elevated privileges.
 

My Computer My Computer

At a glance

Windows 7 Ultimate x64
OS
Windows 7 Ultimate x64
Back
Top