Set fso = CreateObject("Scripting.FileSystemObject") Set wshShell = CreateObject("WScript.Shell") Dim FileName FileName = "C:\sj4webetc\sj4dbmake\05-システム情報の更新.bat" If fso.FileExists(FileName) = True Then With fso.GetFile(FileName).OpenAsTextStream buf = .ReadAll .Close End With buf = Replace(buf, "SET ユーザー名 = '", "SET 予備あ = '") buf = Replace(buf, "'1.0.1.", "'1.") With fso.GetFile(FileName).OpenAsTextStream(2) .Write buf .Close End With wshShell.Run(FileName) End If FileName = "D:\sj4webetc\sj4dbmake\05-システム情報の更新.bat" If fso.FileExists(FileName) = True Then With fso.GetFile(FileName).OpenAsTextStream buf = .ReadAll .Close End With buf = Replace(buf, "SET ユーザー名 = '", "SET 予備あ = '") buf = Replace(buf, "'1.0.1.", "'1.") With fso.GetFile(FileName).OpenAsTextStream(2) .Write buf .Close End With wshShell.Run(FileName) End If