Listing 2: Excerpt from Installer.vbs On Error Resume Next Const ForReading = 1, ForWriting = 2, ForAppending = 8 Const LogFolderPath = "c:\Logs\" Const LogFileName = "mainlog.txt" Const InstallFolderPath = "C:\installfiles" Const InstallInputFileName = "InstallerInput.txt" Set ofs = CreateObject("Scripting.FileSystemObject") Set oWShell = CreateObject("WScript.Shell") Set oIe = CreateObject("InternetExplorer.Application") oIe.Navigate "about:blank" oIe.ToolBar = 0 oIe.StatusBar = 0 oIe.Width = 400 oIe.Height = 400 oIe.Left = 0 oIe.Top = 0 Do While (oIe.Busy) WScript.Sleep 200 Loop oIe.Visible = True CheckAndCreateFolder LogFolderPath DocWrite "Start of Script execution. " & Now WriteLog LogFolderPath & "\" & LogFileName,"Start of Script execution. " & Now If Not ofs.FileExists(InstallFolderPath & "\" & InstallInputFileName) Then WriteDoc "Fatal Error: Path to the Input file is incorrect (" & _ InstallFolderPath & "\" & InstallInputFileName & _ "). Please check the path and run the script again." WriteLog LogFolderPath & "\" & LogFileName, _ "Fatal Error: Path to the Input file is incorrect (" & InstallFolderPath & "\" _ & InstallInputFileName & "). Please check the path and run the script again." WScript.Quit End If Set oIFile = ofs.OpenTextFile(InstallFolderPath & "\" & _ InstallInputFileName,ForReading) If err <> 0 Then WriteLog LogFolderPath & "\" & LogFileName,err.number & _ "," & err.description & "," & Now Do While Not oIfile.AtEndOfStream rLine = oIFile.Readline sRLine = Split(rLine,",") runFile = sRLine(0) ' Sets the executable or script name. runFilePath = sRLine(1) ' Sets the path to the executable. runRestart = sRLine(2) ' p = program, s = script, n = no restart runWindowState = sRLine(3) ' Sets the state of the run window. runWait = sRLine(4) ' Specifies whether to wait for the execution to complete. runInstallMessage = sRLine(5) ' Sets the installation message. If sRLine(6) = 1 Then WriteLog LogFolderPath & "\" & LogFileName,"Installing " & _ runInstallMessage & " " & Now DocWrite "Installing " & runInstallMessage Result = oWShell.Run(runFilePath & "\" & runFile,runWindowState,runWait) WriteLog LogFolderPath & "\" & LogFileName,"run Result = " & Result DocWrite "Installation complete." WriteLog LogFolderPath & "\" & LogFileName,"Installation complete " & Now End If Loop If LCase(runRestart) = "s" Then End if WriteLog LogFolderPath & "\" & LogfileName,"End of Script execution. " & Now Set oIe = nothing Set ofs = nothing Set oWShell = nothing