我正在自定义操作中尝试以下操作:
Session.Log("GetOfficeBitness =" & Session.Property("OfficeBitness"))
我收到错误:
错误 1720。此 Windows Installer 程序包有问题。 A
无法运行完成此安装所需的脚本。接触
您的支持人员或软件包供应商。自定义动作
GetOfficeBitness 脚本错误 -2146827850,Microsoft VBScript 运行时
错误:对象不支持此属性或方法:“Session.Log”
第 39 行,第 9 列,MSI (c) (FC:94) [05:51:13:621]:产品:Windward
报表设计器 32 位 -- 错误 1720。存在问题
Windows 安装程序包。此安装所需的脚本
完整无法运行。联系您的支持人员或包裹
小贩。自定义操作 GetOfficeBitness 脚本错误 -2146827850,
Microsoft VBScript 运行时错误:对象不支持此属性
或方法:“Session.Log”第 39 行第 9 列,
如何写入脚本内的日志?
Logging: 请尝试阅读罗伯特·迪考的 MSI 提示:从自定义操作写入日志文件 https://resources.flexera.com/web/pdf/archive/msi_writing_to_the_log_file.pdf。在本质上
像这样的东西:
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 样品:我刚刚记得我在 github 上放了一个示例:https://github.com/glytzhkof/WiXVBScriptWriteToLog https://github.com/glytzhkof/WiXVBScriptWriteToLog
Tip: 这是一堆 WiX / MSI 链接 https://stackoverflow.com/questions/25004226/msi-vs-nuget-packages-which-are-is-better-for-continuous-delivery/25005864#25005864关于以调试为中心的各种主题。
Links:
-
启用 MSI 安装程序的安装日志,无需任何命令行参数 https://stackoverflow.com/questions/54453922/enable-installation-logs-for-msi-installer-without-any-command-line-arguments/54458890(关于一般 MSI 日志记录)
- Windows Installer 延迟执行 - 我们如何记录在延迟模式下运行的自定义操作? https://stackoverflow.com/questions/57572168/windows-installer-deferred-execution-how-can-we-log-the-custom-actions-running/57573250#57573250
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)