View Full Version : How to write to install log from VBScript Custom Action?

11-19-2008, 03:42 PM
This is more of teh answer to the question:
I found it on the web unfortunatly I can't remember where :(
It is simple and it works:

'In you VBScript add this:
Option Explicit
Dim WshShell
Set WshShell = CreateObject("wscript.Shell")

'This method allows to log info into install log
Function LogInfo(msg)
Dim rec
Set rec = Session.Installer.CreateRecord(1)
rec.StringData(0) = msg
LogInfo = Session.Message(&H04000000, rec)
End Function

'Now start using it
LogInfo "Hello World!"