easy.
it probably is in the first location.
and not second.
so you erase it the returncode with your second line.
that simple.
change the second line to:
$returncode = $returncode + EXIST ("C:\Windows\start menu\programS\startup\ifagent.exe")

cheers,
_________________________
!

download KiXnet