@echo off
SET TEMPFILE="%TEMP%\%RANDOM%.TXT"
echo SELECT VDISK FILE=Your vhd file name with location >%TEMPFILE%
echo ATTACH VDISK>>%TEMPFILE%
DISKPART /s %TEMPFILE%
del %TEMPFILE%
SET TEMPFILE="%TEMP%\%RANDOM%.TXT"
echo SELECT VDISK FILE=Your vhd file name with location >%TEMPFILE%
echo ATTACH VDISK>>%TEMPFILE%
DISKPART /s %TEMPFILE%
del %TEMPFILE%