【问题标题】:Debugging VS2008 VBScript custom install task调试 VS2008 VBScript 自定义安装任务
【发布时间】:2011-08-24 07:35:51
【问题描述】:

我有一个安装项目,它有一个执行 VBScript 文件的自定义操作。就目前而言,此脚本在执行此脚本期间失败,并出现以下错误:

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 vender.

脚本对我来说看起来不错,但我看不到调试它的方法。有没有办法输出跟踪消息,甚至为此暂停执行安装脚本?

【问题讨论】:

  • 您也可以尝试直接执行脚本,而不是从 MSI,我的意思是使用 cscriptwscript。但是,您可能需要对其进行调整。
  • 作为参考,请阅读为什么VBScript MSI CustomActions suck - 使用 C++ 更加健壮。即使无法在此版本中完成(通常是安装开发人员面临发布压力时的情况),这也是未来需要考虑的事情:)

标签: visual-studio-2008 vbscript installation windows-installer custom-action


【解决方案1】:

您可以尝试在脚本中插入以下行以将调试消息输出到日志文件:

Set objFso = CreateObject("Scripting.FileSystemObject")
Set f = objFso.OpenTextFile("C:\Temp\logfile.txt", 8, True)
f.WriteLine "Debug message text"
f.Close

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-18
    • 1970-01-01
    • 2010-09-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多