taskkill -f -im client.exe
ping -n 3 127.0.0.1
set cmdpath=%1%
copy /y  %cmdpath%\client.exe %cmdpath%\client.exe.bak
copy /y  %cmdpath%\updatetmp\client.exe %cmdpath%\client.exe

copy /y  %cmdpath%\pax\pos.exe %cmdpath%\pax\pos.exe.bak
copy /y  %cmdpath%\pax\posHttp.exe %cmdpath%\pax\posHttp.exe.bak
copy /y  %cmdpath%\pax\POSLink.dll %cmdpath%\pax\POSLink.dll.bak
copy /y  %cmdpath%\pax\msvcp100.dll %cmdpath%\pax\msvcp100.dll.bak
copy /y  %cmdpath%\pax\msvcr100.dll %cmdpath%\pax\msvcr100.dll.bak
copy /y  %cmdpath%\pax\Newtonsoft.Json.dll %cmdpath%\pax\Newtonsoft.Json.dll.bak

copy /y  %cmdpath%\updatetmp\pos.exe  %cmdpath%\pax\pos.exe
copy /y  %cmdpath%\updatetmp\posHttp.exe  %cmdpath%\pax\posHttp.exe  
copy /y  %cmdpath%\updatetmp\POSLink.dll %cmdpath%\pax\POSLink.dll
copy /y  %cmdpath%\updatetmp\msvcp100.dll %cmdpath%\pax\msvcp100.dll
copy /y  %cmdpath%\updatetmp\msvcr100.dll %cmdpath%\pax\msvcr100.dll
copy /y  %cmdpath%\updatetmp\Newtonsoft.Json.dll %cmdpath%\pax\Newtonsoft.Json.dll

start %cmdpath%\client.exe
exit