did some rewrite to see the whole picture...
you used instring but that kinda is untrustable, as there could be similar section-names.
with ascan we get exact matches.
this is what I got:
Code:

$RC = split(ReadProfileString("S:\Windows\WinDart.ini","",""),chr(10))
If -1<ascan($RC,"ENV") and -1<ascan($RC,"Shell") and -1<ascan($RC,"Components")
? "WinDart.ini file checks out OK"
Else
$RC = split(chr(10)+ReadProfileString("S:\Windows\WinDart.ctx","",""),chr(10))
If -1<ascan($RC,"ENV") and -1<ascan($RC,"Shell") and -1<ascan($RC,"Components")
? "WinDart.ctx file being copied to WinDart.ini"
Copy "S:\Windows\WinDart.ctx" "S:\Windows\WinDart.ini"
Else
Copy "F:\Template\WinDart\WinDart.ini" "S:\Windows"
EndIf
EndIf

_________________________
!

download KiXnet