I am using MsiProcessMessage() to log messages and to show simple dialogs.
But now have some problems with it.
I added a custom action to button. At that action I am trying to log some
message and show dialog, but nothing happens!

    <CustomAction Id="CACheckBoxAddress" BinaryKey="AdditionsDLL"
DllEntry="CheckAddress"/>

    <UI>
      <Dialog Id="LinuxBoxConfigDlg" Width="370" Height="270"
Title="!(loc.InstallScopeDlg_Title)" KeepModeless="yes">

        <Control Id="BoxLabel" Type="Text" X="25" Y="55" Width="320"
Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.LinuxBoxDlgBoxLabel)"/>
        <Control Id="edLinuxBoxAddess" Type="Edit"
Property="LINUXBOX_ADDRESS" Text="[LINUXBOX_ADDRESS]" X="25" Y="70"
Width="100" Height="17"/>

        <Control Id="Next" Type="PushButton" X="236" Y="243" Width="56"
Height="17" Default="yes" Text="!(loc.WixUINext)">
          <Condition
Action="enable"><![CDATA[(LINUXBOX_ADDRESS<>"")]]></Condition>
          <Condition
Action="disable"><![CDATA[(LINUXBOX_ADDRESS="")]]></Condition>
          <Publish Event="DoAction" Value="CACheckBoxAddress"
Order="1"><![CDATA[(LINUXBOX_ADDRESS<>"")]]></Publish>
        </Control>
    </UI>


Part of custom action code:
  TCHAR szStr[MAX_PATH], szBox[NI_MAXHOST];

  swprintf_s(szStr, L"\"%s\" is not correct address. Could not retrive
IP-address by DNS-name", szBox);
  PMSIHANDLE hLogRec = MsiCreateRecord(1);
  MsiRecordSetString(hRec, 0, szStr);
  MsiSetProperty(hInstall, L"LINUXBOX_ADDRESS_CORRECT", NULL);
  PMSIHANDLE hRec = MsiCreateRecord(1);
  MsiRecordSetString(hRec, 0, L"!!!");
  MsiProcessMessage(hInstall, (INSTALLMESSAGE) (INSTALLMESSAGE_USER |
MB_ICONWARNING | MB_YESNO), hRec);


Installation executing by command "msiexec /i "dfPost-Setup-4.1.0 build
130.msi"  /l*v log.log". But in log there are no messages from custom action
and no one dialogs show
-- 
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Problems-with-MsiProcessMessage-tp5041011p5041011.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to