Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MSI not picking up embedded MST files

309 views
Skip to first unread message

Mark Hatsell

unread,
May 31, 2007, 12:29:01 PM5/31/07
to
Hi all,

sorry about the repeat post, but I put it on the wrong newsgroup. Anyway...

I'm having a problem with embedded mst files. I've got a mst file (1031.mst)
and have embedded it using the emb.vbs from MSDN. Now the following problem
occurs

if I specify

msiexec /i fred.mst TRANSFORMS=1031.mst

then it works fine, the msi is translated into German however if I use

msiexec /i fred.mst TRANSFORMS=:1031.mst

Which should pick up the embedded MST then it fails and the MSI is run in
English.

I have tried removing the lang neutral code page from the summary
information stream but this simply causes our MSI to fail completely saying
the transform paths aren't valid.

Has anyone got any ideas

thanks in advance

Linda Liu [MSFT]

unread,
Jun 1, 2007, 5:10:00 AM6/1/07
to
Hi Mark,

I performed a test on this issue using the Emb.vbs, but didn't reproduce
the problem on my side.

I think there're two possible reasons why you couldn't get the embedded
transform from the MSI package. One reason is that the transform is not
successfully embedded in the fred.msi file. The other reason is that the
transform is embedded in the fred.msi file, but with a name rather than the
'1031.mst'.

Note that it is when you execute the Emb.vbs that the name of the embedded
transform is specified. For example, the following command line specifies
the name of the embedded transform as 'ANewName':

Cscript.exe Emb.vbs SetupTest.msi thetransform.mst ANewName

I suggest that you query the _Storages table in the fred.msi file to see if
the transform named '1031.mst' exists in the table.

Because the _Storages table is a temporay table, created only when
referenced by a SQL statement, we could not find the table when the .msi
file is opened by Orca. Instead, we should write a script to query the
_Storages table. The following is a sample script to query all the names in
the _Storages table. You should save the file as a .vbs file.

Dim installer
Set installer = CreateObject("WindowsInstaller.Installer")

Dim database
Const msiOpenDatabaseModeReadOnly = 0
Set database = installer.OpenDatabase("setuptest.msi",
msiOpenDatabaseModeReadOnly)

Dim view
Set view = database.OpenView("SELECT `Name`,`Data` FROM _Storages")

view.Execute
Do
Set record = view.Fetch
If record Is Nothing Then Exit Do
name = record.StringData(1)
msgbox name
Loop

Hope this helps.

Sincerely,
Linda Liu
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Mark Hatsell

unread,
Jun 1, 2007, 9:14:27 AM6/1/07
to
Hi, thanks for your help,

I've got the embedded msts available at the command line now, but I'm having
another problem.

How do I get the installer engine to automatically select a locale other
than the default one? I have read that this is possible.

I know I need to remove the language neutral codepage from the summary
information stream which I've done. But then if I'm in any other language
than the default one, I get an error regarding transform paths being
invalid.

thanks in advance

"Linda Liu [MSFT]" <v-l...@online.microsoft.com> wrote in message
news:0yzRsyCp...@TK2MSFTNGHUB02.phx.gbl...

Nick Heim

unread,
Jun 3, 2007, 8:44:07 AM6/3/07
to
Hi Mark,
you need to do the following things:
1. Store the language transform exactly with their language codes. eg
1031 or 1033.
2. Include all availabe languages (including the main one) in the
languages field of the summary information.
3. Be aware, that the installer looks up the keyboard settings to
decide the language and not the system locale.
4. This is a undocumented feature, but available for a while now.
Regards, Nick

Mark Hatsell

unread,
Jun 5, 2007, 12:32:00 PM6/5/07
to
Hi,

thanks again.

I've got it working when clicking on the msi (or equivalent), however when I
use the setup.exe, it still comes up with the invalid transforms message.
Anyone got any ideas?

also is there any way to translate the initial Preparing to Install dialog
using this method?

thanks in advance

"Nick Heim" <he...@compuserve.com> wrote in message
news:1180874647.3...@m36g2000hse.googlegroups.com...

Linda Liu [MSFT]

unread,
Jun 8, 2007, 8:06:47 AM6/8/07
to
Hi Mark,

Sorry for my delayed reply.

As Nick has mentioned, using transform to make a multi-language MSI package
is not a documented feature in MSDN, so I spent a lot of time researching
on this issue.

I have done some readings and performed many tests. I tried to get the MSI
package to automatically select a locale based on the steps Nick provided,
but without success.

I set the current location to China and format to China(RPC) on the target
machine, the MSI package still shows the default language UI, i.e. English
when I double click the MSI package. If I run the Setup.exe, I get the same
result(show the default language UI without any error).

I also have a try launch the MSI package using the following command line:
msiexec /i SetupTest.msi TRANSFORMS:=2052

and it shows UI in Chinese.

If you launch your MSI package via the above command line, can you get it
work?

Could you tell me how you get the MSI package to automatically select a
locale when you install the MSI package directly?

> also is there any way to translate the initial Preparing to Install
dialog using this method?

The initial Preparing to Install dialog doesn't exist in the MSI package.
It's the system that shows this dialog. My test shows that the UI displayed
in the initial Preparing to Install depends on the package language of the
MSI package. You may set the package language using Orca.

To do this, open the MSI package using Orca and select View|Summary
Information menu. In the 'Edit Summary Information' dialog, you can set the
Languages field, which is actually the package language.

Mark Hatsell

unread,
Jun 8, 2007, 10:10:39 AM6/8/07
to
Hi Linda

To get it to automatically select the locale you have to embed the msts as
1031 rather than 1031.mst etc and then remove the language neutral id from
the summary information stream. This works fine.

Regarding Setup.exe, If the language neutral code is there then I can get
everything to work fine as you said. However without it, it throws an error.

I have tried using the command line as suggested and also using the /L
option to setup.exe both of which bring up the error.

We really need to select the language automatically so that error codes etc
are correctly translated when performing a group policy installation with
minimal fuss to the user. Likewise we need setup.exe for use in single user
installs.

kind regards


"Linda Liu [MSFT]" <v-l...@online.microsoft.com> wrote in message

news:OctrRWcq...@TK2MSFTNGHUB02.phx.gbl...

Nick Heim

unread,
Jun 10, 2007, 6:17:46 AM6/10/07
to
Hi Linda,

> I have done some readings and performed many tests. I tried to get the MSI
> package to automatically select a locale based on the steps Nick provided,
> but without success.

The "undocumented" is pretty well coverd here:
http://www.installsite.org/pages/en/msi/articles/embeddedlang/index.htm

Maybe you find the time to switch on logging and look at the log file.
You can see the selection of the language transform in there as well.

Regards, Nick

Stefan Krueger [MVP]

unread,
Jun 11, 2007, 12:14:10 PM6/11/07
to
When you specify the languages in the summary information stream, make sure
that the first number listed matches the language in the base .msi, and the
second matches the transform.

--
Stefan Krueger
Microsoft Windows Installer MVP

Please post your questions in the newsgroup or vist one of these web sites:

Windows Installer FAQ
http://www.msifaq.com - http://www.msifaq.de

InstallSite - Resources for Setup Developers
http://www.installsite.org
http://www.installsite.de (GERMAN)

"Nick Heim" <he...@compuserve.com> schrieb im Newsbeitrag
news:1181470666....@m36g2000hse.googlegroups.com...

Linda Liu [MSFT]

unread,
Jun 14, 2007, 12:30:13 AM6/14/07
to
Hi Mark, Nick and Stefan,

Thank you all for replying to me.

With all your help, I work it out at last. Not only the installer shows the
correct UI when I double click the msi package, but also it works when I
run the setup.exe.

The following is the detailed steps of my test.

1. Create a Setup project named SetupTest in VS05 and add the primary
output from a WinForms application. Build the Setup project.

2. Generate a Chinese language transform

a. Copy the SetupTest.msi in the setup project's Debug folder to a new
file named SetupTestChange.msi in the same folder.

b. Set the code page of the SetupTestChange.msi to 936 and its product
language to 2052 using the WiLangId.vbs.
Note: WiLangId.vbs is a sample script in Windows Platform SDK and
you can find it at C:\Program Files\Microsoft Platform
SDK\Samples\SysMgmt\Msi\Scripts.

The command line is like below:
Cscript WiLangId.vbs SetupTestChange.msi codepage 936
Cscript WiLangId.vbs SetupTestChange.msi product 2052

c. Open the SetupTestChange.msi with Orca. Select the Control table and
navigate to the row whose value of the Dialog field is 'WelcomeForm' and
value of the Control field is 'BannerText'. Change the value of the Text
field of this row to some Chinese characters. Save the change.

d. Use the following script to generate the Chinese language transform.

option explicit
dim wi, basedb, newdb
' NOTE: It is very important to use this validation flag to ensure
the transform can be applied to the original msi package later without any
error
const msiTransformValidationNone = 1
const msiTransformErrorNone = 0
set wi = CreateObject("WindowsInstaller.Installer")
set basedb = wi.opendatabase("SetupTest.msi", 0)
set newdb = wi.opendatabase ("SetupTestChange.msi", 0)
newdb.GenerateTransform basedb, "2052.mst"
newdb.CreateTransformSummaryInfo basedb, "2052.mst",
msiTransformErrorNone, msiTransformValidationNone
set wi=Nothing

Save this script as a .vbs file in the setup project's Debug folder
and run it to create a 2052.mst.

3. Embed the 2052.mst into the SetupTest.msi file using WiSubStg.vbs. You
can find the WiSubStg.vbs in the same folder where the WiLangId.vbs resides.
The command line is like below:
Cscript WiSubStg.vbs SetupTest.msi 2052.mst 2052

4. Add 2052 to the package language of the SetupTest.msi (the original
package language of SetupTest.msi is 1033) using WiLangId.vbs.
Cscript WiLangId.vbs SetupTest.msi package 1033, 2052

5. Open the 'Regional and Langage Options' in the Control Panel and set the
Location to China and format to Chinese(PRC).

6. Double-click the SetupTest.msi to run it. The banner text shown in the
welcome form is in Chinese. If I double-click the Setup.exe to launch the
msi package, the banner text shown in the welcome form is in Chinese. In
addition, the prepare to install dialog shows characters in Chinese as well.

Is there any difference between your test and mine?

Linda Liu [MSFT]

unread,
Jun 19, 2007, 10:17:46 PM6/19/07
to
Hi Mark,

How about the problem now?

If the problem is still not resolved, please feel free to let me know.

Thank you for using our MSDN Managed Newsgroup Support Service!

0 new messages