Gen Build Tool token MSI_DATA National Language characters
search cancel

Gen Build Tool token MSI_DATA National Language characters

book

Article ID: 26123

calendar_today

Updated On: 11-10-2024

Products

Gen Gen - Workstation Toolset

Issue/Introduction

The use of National Language characters in the Gen Build Tool profile token MSI_DATA that contain text strings for messages etc e.g. OPT.WELCOMETEXT, result in garbage data being displayed in the resulting msi application. Also certain punctuation characters such as comma (,) and apostrophe (') also cause problems. e.g the following entry:

Results in the NLS data being translated into strings and the whole string is terminated at the first comma.

The use of an apostrophe results in a build error like the following:

Error:Msi API Error 80004005: OpenView,Sql
1: 2237 2: .\testapp.msi 3: INSERT INTO 'Property' ('Property','Value')
VALUES ('WELCOMETEXT','an appostrphe ' a quote "') 4:

 

Resolution

These problems are a result of three factors:

  • Whilst the build tool process can accept Unicode characters the Microsoft MSI build process will only accept standard ANSI codepage characters so the NLS data gets translated.

  • The intermediate data file that is used by the assemble process to hold the msi database values is comma delimited so commas are interpreted and cannot be used.

  • The Script that inserts data into the msi database is SQL like in its syntax and so the apostrophe is used as a string encapsulator and is also interpreted.

There is a workaround for this that will allow the final msi file to contain pretty much what ever data you wish. It involves editing the msi file produced by the Gen Build Tool assemble process using a third-party msi editor. One such freely available tool is Orca which can be downloaded from Microsoft Learn > Orca.exe.

Open the msi file in the tool and then select the Property table in the table column and the WELCOMETEXT Property in the property list. Select the Value and enter the desired string in this field.

Save and close the file then the resulting execution will show the correct string.