cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sjeslis
Level 5

Carriage Return In Custom Action Error Messages?

Anyway to insert a CR, LF, new line, etc. into the Error Message field of an Error Custom Action or even a string property? Knowing that this text will show up in an MSI Dialog (where I read a piece of IS help saying \r, \n, etc. are ignored by the MSI dialog handler).
Labels (1)
0 Kudos
(10) Replies
RobertDickau
Flexera Alumni

Perhaps see [thread=166412]this thread[/thread]? It's a scenic route, but at least used to do the trick...
0 Kudos
sjeslis
Level 5

Robert, I had seen that thread already and tried it to no avail.
0 Kudos
RobertDickau
Flexera Alumni

Hmm, a quick test seems to work: in the Dialog Editor, borrow a text field's Text property to create a new string table entry with Ctrl+Enter between lines (first fig.); in the Direct Editor, create a record (say, 33333) in the Error table that points to that string table entry; create an Error action that references the new Error record.

At run time, the multi-line message should be displayed (second fig.).
0 Kudos
sjeslis
Level 5

Oh, I was trying Ctrl+Enter while in the Error Message field in the "Common" panel for the (Error) Custom Action. In that field Ctrl+Enter returns you to start of your text string.

I'm not creating a Dialog BTW but I can point to a string property... trying to figure out if your answer is relevant in that case :confused:
0 Kudos
RobertDickau
Flexera Alumni

Actually, in InstallShield 2010 it appears you can do this directly in User Interface > String Editor with a new string, without borrowing a dialog's Text field; in previous versions, you had to take the detour to the Dialog Editor, since only its string editor accepted the Ctrl+Enter...
0 Kudos
sjeslis
Level 5

I'm trying this now but running into a different strange problem. The Error Message field of the Error Custom Action appears to be caching the last error message I entered when I run the install. In IS IDE (Custom Actions and Sequences and Direct Editor -> Custom Actions) the text has changed. :confused:
0 Kudos
RobertDickau
Flexera Alumni

I'm not sure I follow; perhaps post steps to reproduce?
0 Kudos
sjeslis
Level 5

Not sure how to reproduce it.

But today when I go into the Installshield IDE and edit the "error message" field of my Error Custom Action the message that is displayed on the resulting warning dialog is the message text I had entered yeaterday or earlier from today.

No matter what text I put into "error message" I see old message text in the warning dialog. I even verified that the text message stored in the MSI's Custom Action table is correct and matches what I'm changing it to.

The only thing I can think of is its a caching issue with the machine om loading onto (a virtual image BTW). Perhaps I will reload the image from a snapshot and try again.
0 Kudos
sjeslis
Level 5

Reloading the image's snapshot took care of the caching issue I was seeing so back to the original problem.

The technique described here by Robert makes use of a string but I can't seem to reference a string, only a property, in the "Error Message" field of an Error Custom Action, i.e. using the [STRING_NAME] syntax.

I tried copying the resulting string variable and paste it into the 'error message" field but the resulting warning dialog seemed not to display anything after the embedded CTRL-ENTER in the message text.
0 Kudos
RobertDickau
Flexera Alumni

Actually, the Error action will take the numeric key value from your record in the Error table (33333 in my example).
0 Kudos