将InstallShield日志重定向到控制台 [英] Redirecting the InstallShield log to console

查看:65
本文介绍了将InstallShield日志重定向到控制台的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用InstallShield 2011自动化界面来创建我的安装程序.在构建期间,将在MSI_English \ LogFiles文件夹中生成日志文件.

I'm using the InstallShield 2011 Automation Interface to create my installer. During the build log files are generated in the MSI_English\LogFiles folder.

是否可以将日志重定向到控制台.这对于我的构建服务器会更方便.

Is it possible to redirect the log to the console. This would be more convenient for my build server.

推荐答案

简单的答案可能是使用iscmdbld.exe代替自动化界面.这已经将消息发送到控制台.

The simple answer may be to use iscmdbld.exe instead of the automation interface. This already sends messages to the console.

更复杂的答案应该是使用构建状态事件(其VB样本摘录如下).特别是,您将要处理StatusMessage事件.请注意,您需要更改21的实例以匹配其余自动化脚本的版本.

The more complex answer should be to use build status events (its VB sample is excerpted below). In particular you will want to handle the StatusMessage event. Note that you'll want to change the instances of 21 to match the version of the rest of your automation script.

Public WithEvents pISWiRelease As ISWiAuto21.ISWiRelease

Private Sub Foo()
    Dim pISWiProject As IswiAuto21.ISWiProject
    Set pISWiProject = CreateObject("IswiAuto21.ISWiProject")
    pISWiProject.OpenProject "C:\InstallShield 2014 Projects\My Project Name-1.ism", False
    Set pISWiRelease = pISWiProject21.ISWiProductConfigs("Product Configuration 1").ISWiReleases("Release 1")
    pISWiRelease.Build
    pISWiProject.CloseProject
    Set pISWiRelease = Nothing
    Set pISWiProject = Nothing
End Sub

Private Sub pISWiRelease_ProgressIncrement(ByVal lIncrement As Long, pbCancel As Boolean)
    ' Place your code here
End Sub

Private Sub pISWiRelease_ProgressMax(ByVal lMax As Long, pbCancel As Boolean)
    ' Place your code here
End Sub

Private Sub pISWiRelease_StatusMessage(ByVal sMessage As String, pbCancel As Boolean)
    ' Place your code here
End Sub

这篇关于将InstallShield日志重定向到控制台的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆