procedure TForm1.Button1Click(Sender: TObject);<br>var s:tstringlist;<br>begin<br> s:=TStringList.Create;<br> s.LoadFromFile('c:/autoexec.bat');<br> if pos('PATH',s.Text)>0 then showmessage('&Otilde;&Ograve;&micro;&frac12;&Aacute;&Euml;')else showmessage('&Atilde;&raquo;&Otilde;&Ograve;&micro;&frac12;');<br> s.free;<br>end;<br>以上是查找文本<br>如果是二进制文件,还得变程序