@echo off echo VM Selection Dialog. Use only numbers. Order will be server08advanced.vhd, server08Core.vhd and windows7.vhd. SET /P server08AdvCount=How many server08advanced Hard Disks do you want copied (default is 2, 0 for none): || set server08AdvCount=2 SET /P serverCoreCount=How many serverCore Hard Disks do you want copied (default is 1, 0 for none): || set serverCoreCount=1 SET /P win7Count=How many windows7 Hard Disks do you want copied (default is 0): || set win7Count=0 echo. echo. SET /P cleanup=Do you wish to remove the existing VM's (Y/N), default is Y: || set cleanup=Y echo %cleanup% | findstr /R /I "^Y.*" && ( echo Removing Existing VHD's in C:\Temp. If there are none, ignore the next error. attrib -r c:\temp\*.vhd del C:\Temp\*.vhd /F /Q echo. ) IF NOT %server08AdvCount%==0 ( FOR /l %%A IN (1,1,%server08AdvCount%) DO ( IF %%A==1 ( echo Copying 'C:\Virtual Machines\Server 2008\server08advanced.vhd' to 'C:\Temp\server08advanced.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\"Virtual Machines"\"Server 2008"\server08advanced.vhd /B C:\Temp\server08advanced.vhd /B ) IF %%A GTR 1 ( echo Copying 'C:\Temp\server08advanced.vhd' to 'C:\Temp\server08advanced%%A.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\Temp\server08advanced.vhd /B C:\Temp\server08advanced%%A.vhd /B echo Changing UUID of Alternate Hard Disk C:\"Program Files"\Oracle\VirtualBox\VBoxManage.exe internalcommands sethduuid C:\Temp\server08advanced%%A.vhd echo. ) echo Copying Complete echo. ) ) IF NOT %serverCoreCount%==0 ( FOR /l %%B IN (1,1,%serverCoreCount%) DO ( IF %%B==1 ( echo Copying 'C:\Virtual Machines\Server 2008\server08core.vhd' to 'C:\Temp\server08core.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\"Virtual Machines"\"Server 2008"\server08core.vhd /B C:\Temp\server08core.vhd /B ) IF %%B GTR 1 ( echo Copying 'C:\Temp\server08core.vhd' to 'C:\Temp\server08core%%B.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\Temp\server08core.vhd /B C:\Temp\server08core%%B.vhd /B echo Changing UUID of Alternate Hard Disk C:\"Program Files"\Oracle\VirtualBox\VBoxManage.exe internalcommands sethduuid C:\Temp\server08core%%B.vhd echo. ) echo Copying Complete echo. ) ) IF NOT %win7Count%==0 ( IF %win7Count% GTR 0 ( FOR /l %%C IN (1,1,%win7Count%) DO ( IF %%C==1 ( echo Copying 'C:\Virtual Machines\Windows 7\Windows 7.vhd' to 'C:\Temp\windows7.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\"Virtual Machines"\"Windows 7"\"Windows 7".vhd /B C:\Temp\"Windows 7".vhd /B ) IF %%C GTR 1 ( echo Copying 'C:\Temp\Windows 7.vhd' to 'C:\Temp\Windows 7%%C.vhd' echo This is a large file and will take quite some time. Please wait patiently until seeing 'Copying Complete'. COPY /B /Y C:\Temp\server08core.vhd /B C:\Temp\server08core%%C.vhd /B echo Changing UUID of Alternate Hard Disk C:\"Program Files"\Oracle\VirtualBox\VBoxManage.exe internalcommands sethduuid C:\Temp\server08core%%C.vhd echo. ) echo Copying Complete echo. ) ) ) attrib -r c:\temp\*.vhd echo. echo. echo Be sure to edit each Virtual Machine BEFORE YOU START IT echo by clicking Settings--Network and then opening the Advanced Tab. echo. echo Select Attached to... Bridged Adapter, echo and Adapter type... Intel Pro/1000 Desktop. pause