Set objShell = CreateObject("WScript.Shell")
Set filesys = CreateObject("Scripting.FileSystemObject")

' -- Open Delphi & wait until is active
objShell.Run "C:\PROGRA~1\Borland\Delphi5\Bin\delphi32.exe /ns /np"
Do Until Success = True
    Success = objShell.AppActivate("Delphi")
    Wscript.Sleep 500
Loop
 
' -- Open Delphi & wait until is active
If filesys.FileExists("CoInit.ini") Then
   Set db = filesys.OpenTextFile("CoInit.ini", 1)
   dLine = db.ReadLine
   Do until (db.AtEndOfStream)
      	objShell.Run dLine
	dLine = db.ReadLine
   loop
End If

