From your description it sounds like you effectively just need to do a string replace? Replace "LS: N" with "LS: Y" and "$LASTSORT N" with "$LASTSORT Y"?
If I understand correctly this should do what you want. Reads in a file, then replaces the text in every file specified in that file, writing the result to the same file.
Naturally, you should try it out before you go having it run amuck on the system(s) in question, but I'm sure that is your intention.
ForReading = 1
ForWriting = 2
InputFile = "D:\fileslist.txt" 'Set Input file. can be set to first argument provided with = WScript.Args(0)
Set FSO = CreateObject("Scripting.FileSystemObject")
Set FileListStream = FSO.OpenTextFile(InputFile, ForReading, False) ' Open the File List file.
InputFilesStr = FileListStream.ReadAll
FileListStream.Close
InputFiles = Split(InputFilesStr, Chr(13) + Chr(10)) 'Split file list file contents we read in into an array.
For Each ReadFileName In InputFiles
'read the contents of the file, close the file, replace the text, then write the replaced text back to the same file.
Set InputStream = FSO.OpenTextFile(ReadFileName, ForReading, False)
InputText = InputStream.ReadAll
OutputText = Replace(Replace(InputText, "LS: N", "LS: Y"), "$LASTSORT N", "$LASTSORT Y")
Set OutputStream = FSO.OpenTextFile(ReadFileName, ForWriting, False)
OutputStream.Write OutputText
OutputStream.Close
Next