Hi guys
I want to display a some messages while my script is running for debugging.
Please let me know a proper vbs method to output a message into "run log" tab.
Regards,
Code: Select all
Function WriteToLog
' constant taken from
' http://msdn.microsoft.com/en-us/library/aa371672%28VS.85%29.aspx
Const msiMessageTypeInfo = &H04000000
' create the record for the message
Set msgRec = Installer.CreateRecord(1)
' first field is the message templatetemplate
msgRec.StringData(0) = "Loging from vbscript: [1]"
' get the message that is to be written to the log
dim message
message = CStr(Session.Property("CustomActionData"))
' the second field holds the value to be placed in [1] placeholder
msgrec.StringData(1) = message
' send message to running installer
Session.Message msiMessageTypeInfo, msgrec
' return success
WriteToLog = 0
End Function