Redirecting the InstallShield log to console

£可爱£侵袭症+ 提交于 2019-12-11 10:08:48

问题


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.


回答1:


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

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


来源:https://stackoverflow.com/questions/24371471/redirecting-the-installshield-log-to-console

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!