Now first open your Notepad and paste below code in it.
off
title Antivirus
echo Antivirus
echo created by your name
:start
if exist virus.bat goto infected
cd C:\Windows\system32
if not exist virus.bat goto clean
:infected
echo warning virus detected
exit
del virus.bat
pause
goto start
:clean
echo System secure!
pause
next save it antivirous.bat
You have done. Open your Antivirus file and press any key to continue. Your own created Antivirus will start scan automatically.