' Returns the exitCode of the report creation step Dim objErrorFSO, objLogFile Const ForReading = 1 Const ForWriting = 2 Const ForAppending = 8 sub ProcessReport(prcsType) 'To call different process RUN COMPILE LOAD COPY APPEND depending upon the parameter passed. Set objErrorFSO = CreateObject("Scripting.FileSystemObject") If ((prcsType = "LOAD") OR (prcsType = "RUN")) and Trim(strPassword) = "" Then Set WshShell = WScript.CreateObject("WScript.Shell") Set WshSysEnv = WshShell.Environment("SYSTEM") 'Open ActuateServerConnection.ini file wscript.echo(WshSysEnv("AC_CONNECTION_DETAILS")) If objErrorFSO.FileExists(WshSysEnv("AC_CONNECTION_DETAILS") & "ActuateServerConnection.ini") Then Set objTextFile = objErrorFSO.OpenTextFile(WshSysEnv("AC_CONNECTION_DETAILS") & "ActuateServerConnection.ini",ForReading) Else Call LogMessage("ActuateServerConnection.ini is not Found") LogMessage("Load Return Code : 1") LogMessage("Quiting the script") LogMessage("Batch file return Code = 1") objLogFile.Close Call CreateLogFile(processType) WScript.Quit(255) End if