1
votes

I am trying the following inside a customaction:

Session.Log("GetOfficeBitness =" & Session.Property("OfficeBitness"))

And I am getting the error:

Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action GetOfficeBitness script error -2146827850, Microsoft VBScript runtime error: Object doesn't support this property or method: 'Session.Log' Line 39, Column 9, MSI (c) (FC:94) [05:51:13:621]: Product: Windward Report Designer 32-bit -- Error 1720. There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor. Custom action GetOfficeBitness script error -2146827850, Microsoft VBScript runtime error: Object doesn't support this property or method: 'Session.Log' Line 39, Column 9,

How can I write to the log inside my script?

1
Does this answer your question? how to add a log to my vbscriptuser692942
@Lankymart I don't think so because my vbscript is in a wix file. I haven't found a way to have a stand-alone vbscript in the wix file that I can then call from another script.David Thielen
Does this answer your question? WIX installer execute vbscript from CustomActionuser692942

1 Answers

1
votes

Logging: Please try to read Robert Dickau's MSI Tip: Writing to the Log File from a Custom Action. In essence something like this:

option explicit
dim inst, rec
set inst = CreateObject("WindowsInstaller.Installer")
set rec=inst.CreateRecord (2)
rec.StringData(1) = "Logging call from " & property("CustomActionData")
Session.Message &H04000000, rec

WiX Sample: I just remembered that I put a sample for this on github: https://github.com/glytzhkof/WiXVBScriptWriteToLog


Tip: Here is a bunch of WiX / MSI links on all kinds of topics centering around debugging.


Links: