@echo off
cls
echo Deleting old driver, if present...
erasedrv.exe
echo
echo Installing new driver...
rundll32.exe setupapi.dll,InstallHinfSection MEFlash_DDI.NT 132 .\meflash.inf
echo Done.

echo Start to make Neo USB Driver setup!!

echo U400 USB Driver Registery Entry..!!
regedit /s U400_USB.reg

if not exist C:\WINNT\system32  goto WINDOW_OS_XP
echo Window2000 OS System
echo Copy epausb.dll
copy epausb.dll C:\WINNT\system32
echo Copy meflash_jni.dll
copy meflash_jni.dll C:\WINNT\system32
echo Copy meflash.dll
copy meflash.dll C:\WINNT\system32

goto EXIT

:WINDOW_OS_XP
if not exist C:\WINDOWS\system32  goto NOT_EXIST
echo WindowXP OS System
echo Copy epausb.dll
copy epausb.dll C:\Windows\system32
echo Copy meflash_jni.dll
copy meflash_jni.dll C:\Windows\system32
echo Copy meflash.dll
copy meflash.dll C:\Windows\system32

goto EXIT

:NOT_EXIST
echo Plaese check system32 folder..!

:EXIT
echo	Success install..!