![]() |
Замена определенной строки в скрипте vbs
Добрый день! Помогите написать скрипт заменны определенной строки в скрипте vbs
Или изменить этот: Const ForReading = 1 Const ForWriting = 2 Set wshshell = CreateObject("wscript.shell") ReplaceSource = "home1" 'Что ищем Replacetarget = "home2" ' На что меняем Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile(UsrProfDir & "c:\test.vbs", ForReading) strText = objFile.ReadAll objFile.Close strNewText = Replace(strText, ReplaceSource, Replacetarget ) Set objFile = objFSO.OpenTextFile(UsrProfDir & "c:\test.vbs", ForWriting) objFile.WriteLine strNewText objFile.Close |
Время: 18:18. |
Время: 18:18.
© OSzone.net 2001-