PreviousNext
Help > Installation > Installation as "Windows Service" > Dialog boxes with "Windows Service" mode > Configuration for the « Message » boxes.
Configuration for the « Message » boxes.

To change the default behavior of LAUNCHER Office against message boxes, the possible options in Launcher.ini are:


[ServiceDialogs]
MsgBoxText_<n>=<start_of_text>
MsgBoxActionNum_<n>=<button_number>

<n> is a number that starts at 1

<start_of_text> is the beginning of the text in the dialog box (see the value of "MsgBoxText =" in the trace).

<button_number> is the number of the button to press (starts at 1) or 0 (at the default) so that the default button is selected.

 

Example:

Dialog Info: DialogTitle=Microsoft Word, DialogClass=# 32770, Style= 94c801c5, StyleEx=10101, Id=0. MsgBoxText=Do you want to save changes made to Document1?

Button n.1 ID 6: '& Yes'

Button n.2 ID 7: '& No'

Button n.3 ID 2: 'Cancel'

To handle this case, we can insert:

[ServiceDialogs]
MsgBoxText_1 = Do you want to save the changes
MsgBoxActionNum_1 = 2

After modifying launcher.ini (and restarting the service), the trace will show for the same case:

Dialog info: DialogTitle = Microsoft Word, DialogClass = # 32770, Style = 94c801c5, StyleEx = 10101, Id =
MsgBoxText = Do you want to save changes made to Document1?
Button n.1 ID 6: '& Yes'
Button n.2 ID 7: '& No'
Button n.3 ID 2: 'Cancel'

The button number #2 (labeled: '& No') into the message box the 'Do you want to save changes to Document1?' was automatically selected.

To make multiple rules, simply increment <n>. For example:

[ServiceDialogs]
MsgBoxText_1 = Do you want to save the changes
MsgBoxActionNum_1 = 2
MsgBoxText_2 = Text Second Box
MsgBoxActionNum_2 = 0