Here's code to search trough the txt file for a specific word.
Script echo's a number for the times the word was found and 0 if it wasn't found at all.

 Code:
$Script = "C:\boot.ini"
$SearchWord = "windows"
$FSO = CreateObject("Scripting.FileSystemObject")
$ReadScript = $FSO.OpenTextFile($Script, 1, -1)
While Not $ReadScript.AtEndOfLine
  $var = InStr($ReadScript.ReadLine,$SearchWord)
  If $var <> 0
   $fnCount = $fnCount + 1  
  EndIf
Loop
$ReadScript.Close
$FSO = ""
? $fnCount