[系統]Clone Windows XP Mode

[系統]Clone Windows XP Mode

參考:Windows 7 - Virtual XP Machine – Copy

有空再把它寫成exe 檔.

 

REM # For Windows 7 繁體中文版
REM # Example: d:\temp\cloneVPC.bat 
REM ######################################

SET SourceName=Windows XP Mode
SET TargetName=Windows XP Mode_New

cd "%USERPROFILE%\AppData\Local\Microsoft\Windows Virtual PC\虛擬機器"
%SystemDrive%
Copy "%SourceName%.vhd" "%TargetName%.vhd"
Copy "%SourceName%.vmc" "%TargetName%.vmc"

REM (1) Replace %SourceName%.vhd to %TargetName%.vhd inner %TargetName%.vmc. //pci_bus/ide_adapter/ide_controller/location/pathname/absolute and relative
REM (2) Replace %SourceName%.vhd to %TargetName%.vhd inner %TargetName%.vmc. //pci_bus/ethernet_adapter/ethernet_controller/virtual_network/id add bytes for mac
Notepad "%TargetName%.vmc"

cd "%USERPROFILE%\Virtual Machines"
Copy "%SourceName%.vmcx" "%TargetName%.vmcx"
REM Replace %SourceName%.vhd to %TargetName%.vhd inner %TargetName%.vmcx /vm_description/primary_disk1 and vmc_path
Notepad "%TargetName%.vmcx"

:end