' Abort if the end of the INI file is reached
If objIniFile.AtEndOfStream Then Exit Do
' Continue with next line
strLine = Trim( objIniFile.ReadLine )
Loop
Exit Do
End If
Loop
objIniFile.Close
Else
REM WScript.Echo strFilePath & " doesn't exists. Exiting..."
REM Wscript.Quit 1
REM Msgbox strFilePath & " doesn't exists. Exiting..."
Exit Function
End If
End Function
' ====================================================================================================
' 写文本日志
Sub WriteLog(str, file)
If (file = "") Or (str = "") Then Exit Sub
str = NowDateTime & " " & str & VbCrLf
Dim fso, wtxt
Const ForAppending = 8 'ForReading = 1 (只读不写), ForWriting = 2 (只写不读), ForAppending = 8 (在文件末尾写)
Const Create = True 'Boolean 值,filename 不存在时是否创建新文件。允许创建为 True,否则为 False。默认值为 False。
Const TristateTrue = -1 'TristateUseDefault = -2 (SystemDefault), TristateTrue = -1 (Unicode), TristateFalse = 0 (ASCII)







