link
@echo off
set rechner1=test1
set ziel=D:\VMWare\Production
set quelle=D:\VMWare\_Template
cd "C:\Programme\VMware\VMware VmPerl Scripting API"
:check
if exist "%ziel%\%Rechner1%\Windows XP Professional.vmdk.lck" goto shutdownvm1
:shutdownvm1
call vmware-cmd "%ziel%\%Rechner1%\Windows XP Professional.vmx" stop trysoft
call vmware-cmd -s unregister "%ziel%\%rechner1%\Windows XP Professional.vmx"
goto check
:wait
:xcopy
:check2
if exist "%ziel%\%Rechner1%\Windows XP Professional.vmx" goto register1
:check3
:register1
call vmware-cmd -s register "%ziel%\%rechner1%\Windows XP Professional.vmx"
call vmware-cmd "%ziel%\%rechner1%\Windows XP Professional.vmx" start
goto check3
echo Alle VM`s laufen wieder!!
pause