问题
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