Code:
Dim iFileNumber As Integer, sLineText As String
iFileNumber = FreeFile
Open App.Path & "\temp.reg" For Input As #iFileNumber
Do While Not EOF(iFileNumber)
Input #iFileNumber, sLineText
Text1.text = Replace$(sLineText, "ControlSet002", "CurrentControlSet", , , vbTextCompare)
Loop
Close #iFileNumberI would do strip(slinetext, "ÿþ") but there's a lot of different garbage in there and results are whacky even when I try it, like it inserts extra line feeds after = characters, and other things... Also, you may see in text1.text "ÿþThen Normal Text After That" but if I actually try to write a new text file, it appears that the ÿþ garbage at the beginning of the line makes the entire line written as just a bunch of square blocks.
Obviously my goal is to export a registry file, replace the text in each line, and re-import it.
Any help is appreciated!