Files
mirror-processhacker/2.x/trunk/build/sdk/replace.vbs
T
wj32 8324879977 generate phappresource.h
git-svn-id: svn://svn.code.sf.net/p/processhacker/code@3590 21ef857c-d57f-4fe0-8362-d861dc6d29cd
2010-09-10 23:45:27 +00:00

18 lines
473 B
Plaintext

Const ForReading = 1
Const ForWriting = 2
strFileName = Wscript.Arguments(0)
strOldText = Wscript.Arguments(1)
strNewText = Wscript.Arguments(2)
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(strFileName, ForReading)
strText = objFile.ReadAll
objFile.Close
strNewText = Replace(strText, strOldText, strNewText)
Set objFile = objFSO.OpenTextFile(strFileName, ForWriting)
objFile.Write strNewText
objFile.Close