On Error Resume Next
? BEGIN CALLOUT A
? BEGIN COMMENT
? Initialize display window.
? END COMMENT
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
Set oDoc = oIe.Document
? END CALLOUT A
? BEGIN CALLOUT B
Set wShell = CreateObject(«WScript.Shell»)
Set ofs = CreateObject(«Scripting.FileSystemObject»)
inFileName = «installer_input.txt»
If ofs.FileExists(inFileName) Then
  Set f = ofs.OpenTextFile(inFileName,1)
    Do Until f.atendofstream
      fLine = Rtrim(Ltrim(f.Readline))
      If fLine <> «» Then
        sLine = split(fLine,»,»)
        DocWrite «Running: » & sLine(1)
        WShell.Run sLine(0),1,true
      End If
    Loop
  f.Close
  Set f = nothing
  oIe.Quit
Else
  DocWrite «Fatal Error! Input file not found»
End If
Set ofs = nothing
Set wShell = nothing
? END CALLOUT B
? BEGIN CALLOUT C
Sub DocWrite(msg)
  oDoc.Write msg & «

» End Sub ? END CALLOUT C

Поделитесь материалом с коллегами и друзьями