Displaying a messagebox - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Displaying a messagebox

http://www.advancedinstaller.com/user-g ... e-box.html
This guide will explain how to display a message box using the "Message Box" Custom Action

On the Custom Actions page, right click where you want to add your message box, then from the context menu select "New Custom Action"->"Message Box"

Parameters for this custom action must be placed in the "Action Data" field. Data in the "Action Data" field must be placed in the following format:

MessageBody | MessageTitle | Type | OutputPropertyName | ParentProcessId
Wheres the "Action Data" field?
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Displaying a messagebox

Hello,

Please note that if you are using the message box custom action as a UI custom action, you will have to set the CustomActionData property (using a SetProperty published event) instead of the ActionData field, as specified on the bottom of the Message Box's user guide.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Displaying a messagebox

Looks like I have it set up correctly, i'm trying to display a message on screen when the username isnt found, this seems to be working correctly, but only for the 1st time I press next. here is what i'm doing
1. putting the wrong username in the dialog box
2. pressing next, I dont get the messagebox telling me that the user is wrong (although I have seen this appear "sometimes")
3. putting the correct username in the dialog and pressing next

On my Next button I have the following published events
1. DoAction : CheckUserExists
2. CustomActionData : That username does not exist or cannot be verified. Please check your settings. | User Error | MB_OK , MB_SETFOREGROUND , MB_ICONWARNING | | [CLIENTPROCESSID]
3. Do Action : MessageBox : Conditional on AI_USER_EXISTS=No
4. NewDialog : FolderDlg (the next dialog) : Conditional on AI_USER_EXISTS=Yes

Action 12:02:03: WelcomeDlg.
Action start 12:02:03: WelcomeDlg.
MSI (c) (14:B0) [12:02:15:917]: PROPERTY CHANGE: Adding USER_NAME property. Its value is 'Fergus'.
MSI (c) (14:B0) [12:02:15:919]: PROPERTY CHANGE: Adding DOMAIN_NAME property. Its value is 'FergusV'.
MSI (c) (14:B0) [12:02:15:920]: PROPERTY CHANGE: Adding USER_PASSWORD property. Its value is '**********'.
Action ended 12:02:15: WelcomeDlg. Return value 1.
MSI (c) (14:CC) [12:02:15:924]: Doing action: CheckIfUserExists
Action 12:02:15: CheckIfUserExists.
Action start 12:02:15: CheckIfUserExists.
MSI (c) (14:BC) [12:02:15:931]: Invoking remote custom action. DLL: C:\Users\Aperta\AppData\Local\Temp\MSIE13C.tmp, Entrypoint: CheckIfUserExists
MSI (c) (14!88) [12:02:15:952]: Note: 1: 2205 2: 3: AI_UserAccounts
MSI (c) (14!88) [12:02:15:953]: Note: 1: 2228 2: 3: AI_UserAccounts 4: SELECT `UserName` FROM `AI_UserAccounts` WHERE `UserName` = ?
MSI (c) (14!88) [12:02:15:955]: PROPERTY CHANGE: Adding AI_USER_EXISTS property. Its value is 'No'.
Action ended 12:02:15: CheckIfUserExists. Return value 1.
MSI (c) (14:CC) [12:02:15:959]: Doing action: LogonInformationDlg
Action 12:02:15: LogonInformationDlg.
Action start 12:02:15: LogonInformationDlg.
MSI (c) (14:B0) [12:02:15:964]: PROPERTY CHANGE: Adding CustomActionData property. Its value is 'That username does not exist or cannot be verified. Please check your settings. | User Error | MB_OK , MB_SETFOREGROUND , MB_ICONWARNING | | 4372'.
MSI (c) (14:60) [12:02:53:635]: PROPERTY CHANGE: Modifying USER_NAME property. Its current value is 'Fergus'. Its new value: 'Aperta'.
Action ended 12:02:53: LogonInformationDlg. Return value 1.
MSI (c) (14:CC) [12:02:53:639]: Doing action: CheckIfUserExists
Action 12:02:53: CheckIfUserExists.
Action start 12:02:53: CheckIfUserExists.
MSI (c) (14:6C) [12:02:53:648]: Invoking remote custom action. DLL: C:\Users\Aperta\AppData\Local\Temp\MSI7487.tmp, Entrypoint: CheckIfUserExists
MSI (c) (14!80) [12:02:53:669]: PROPERTY CHANGE: Modifying AI_USER_EXISTS property. Its current value is 'No'. Its new value: 'Yes'.
Action ended 12:02:53: CheckIfUserExists. Return value 1.
MSI (c) (14:CC) [12:02:53:673]: Doing action: LogonInformationDlg
Action 12:02:53: LogonInformationDlg.
Action start 12:02:53: LogonInformationDlg.
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Displaying a messagebox

Hello,

Please note that you have placed the No without quotes. The correct condition for your message box custom action is AI_USER_EXISTS="No". Note the quotation marks.

Best regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
FergusMurray
Posts: 150
Joined: Thu Sep 30, 2010 10:44 am

Re: Displaying a messagebox

ahh, I guess I got caught since the validate doesn't identify it as a fail

Thanks Gabriel

Return to “Common Problems”