Your code should also work if you use exist (instaed of exists), eg

if not exist "%systemroot%\system32\myfile.dll"
...

Regards
Niaz