VHD disappears upon reboot
كلمة منفعة :: Windows :: Troubleshooting
صفحة 1 من اصل 1
VHD disappears upon reboot
How do I make the VHD stay attached after I reboot? I don't want to have to manually attach it every time.
Automatically attaching VHD files in Windows 7 and Windows 2008
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
If you have played with the new VHD feature in windows 7 or windows 2008 then you know just how cool of a feature this is. However the problem is that when you reboot your machine you find that when it comes back up all your VHD files are no longer attached? Here is what I did to get around the issue.
You have now completed all the necessary steps. Restart your computer and you should find that your VHD files are now automatically attached. One caveat is that if you reboot and you log into your machine quick enough it is possible that the task may not have been run yet. Once you are logged in if the task runs you will get an Autoplay dialog as follows. Simply close it. This does not happen if the task runs before you get logged in.
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
If you have played with the new VHD feature in windows 7 or windows 2008 then you know just how cool of a feature this is. However the problem is that when you reboot your machine you find that when it comes back up all your VHD files are no longer attached? Here is what I did to get around the issue.
- Create a batch file that will hold the following line:
diskpart /s “c:\path to script\diskpartscript.txt”
I named my batch file attachvhd.bat and placed it in the same folder as my VHD files
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Create the script file that is being referenced by the attachvhd.bat batch file. Here is what the contents of that script needs to contain:
select vdisk file="c:\path to vhd files\myvhddrive.vhd"
attach vdisk
I named my script file diskpartscript.txt and placed it in the same folder as my VHD files.
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Create a scheduled task that will automatically run when your machine starts up.
- Go to Start / Administrative Tools / Task Scheduler
- Click Create Basic Task
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Fill in the name of the task and the description and Click Next
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Select “Start a program” radio button option and then Click Next
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Select “When the computer starts” and then Click Next
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Browse to the folder that you setup your batch file in and select it. Click Next
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط] - Click Finish
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
[ندعوك للتسجيل في المنتدى أو التعريف بنفسك لمعاينة هذا الرابط]
رد: VHD disappears upon reboot
try VHD Attach 1.60 (http://www.jmedved.com/?page=vhdattach) or use this script:
كلمة منفعة :: Windows :: Troubleshooting
صفحة 1 من اصل 1
صلاحيات هذا المنتدى:
لاتستطيع الرد على المواضيع في هذا المنتدى