|
- @echo off
- if "%1"=="" goto :reg
- set vhd_file=%1
- if exist "%temp%\attach.txt" del "%temp%\attach.txt"
- echo select vdisk file="%vhd_file%">"%temp%\attach.txt"
- echo compact vdisk>>"%temp%\attach.txt"
- echo create vdisk file="%vhd_file:win=win_1%" parent="%vhd_file%">>"%temp%\attach.txt"
- diskpart /s "%temp%\attach.txt"
- del "%temp%\attach.txt"
- goto eof
- :reg
- reg add "HKCR\Windows.VhdFile\shell\vparent" /f /ve /t REG_SZ /d "建立差分VHD"
- reg add "HKCR\Windows.VhdFile\shell\vparent\command" /f /ve /t REG_SZ /d "D:\VHDTest\vparent.cmd %%1"
- goto eof
复制代码 |
评分
-
查看全部评分
|