MSI Log Debug Log Sink

I have an InstallShield MSI project. When I pass MSIHANDLE from a custom InstallScript action to a managed assembly initialized through DotNetCoCreateObject (), the value obtained in my managed code is -2.

Does anyone know if MSIHANDLE can be accessed from a custom InstallScript action that invokes managed code through DotNetCoCreateObject ()? I would like to record the results of my actions in the same log file as the rest of the installation. I am using InstallShield 2010, Windows Install 4.5 and .Net 3.5.

+3
source share
3 answers

InstallShield InstallShield.Interop.Msi.dll, .

MSI , :

 using (Msi.Install msi = Msi.CustomActionHandle(_msiHandle))
 {
     using (Msi.Record record = new Msi.Record(100))
     {
         record.SetString(0, "LOG: [1]");
         record.SetString(1, entry.Message);
         msi.ProcessMessage(Msi.InstallMessage.Info, record);
     }
 }

: IS2010, InstallShield.Interop.Msi.dll , .

+4

, . .

0

, IS : InstallScript MSI. MSI MSI.

0
source

Source: https://habr.com/ru/post/1718642/


All Articles