我正在自定义操作中尝试以下操作:
Session.Log("GetOfficeBitness =" & Session.Property("OfficeBitness"))
我收到错误:
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,
如何写入脚本内的日志?
最佳答案
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
提示:Here is a bunch of WiX / MSI links以调试为中心的各种主题。
链接:
关于vbscript - 在wix中,使用vbscript,如何写入日志文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60362396/