Ok. Try and see if this works.
If I'm right, it will replace all occurences of the given "find" string within the file.
Private Sub FindAndReplace(ByVal FileName As String, ByVal find As String, ByVal replace As String)
Dim fs As IO.FileStream
fs = New IO.FileStream(FileName, IO.FileMode.OpenOrCreate)
Dim buffer() As Byte
Using br As New IO.BinaryReader(fs)
buffer = br.ReadBytes(fs.Length)
End Using
fs.Close()
fs = New IO.FileStream(FileName, IO.FileMode.Create)
Dim text As String = System.Text.Encoding.UTF8.GetString(buffer).Replace(find, replace)
Using bw As New IO.BinaryWriter(fs)
buffer = System.Text.Encoding.UTF8.GetBytes(text)
bw.Write(buffer)
End Using
MessageBox.Show("Finished", "", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub