wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

Language Problem

When trying to build an install-package for our product, I get the following error:

Exception - Reason: Could not open module: D:\Projects\<Project>\kits\components\msxml4sxs32.msm. Error:The language of the current build is not supported by the specified merge module.

The main-product language is german, but there are no german merge-modules for MSXML available.

Any hints how to proceed?

Many thanks in advance
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

Instead of using the merge modules, you could add the localized "msxmlger.msi" file as a Prerequisite for your package. It can be downloaded from:
http://www.microsoft.com/downloads/deta ... d7485f2b42

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

But msxmlger.msi has over 5 MB instead of just 600k for the mergefile.
And if I want to do that for multiple languages ...

Question is: can we disable the language check producing the error? Version 3.4 of Advanced Installer worked without this problem.
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,
Version 3.4 of Advanced Installer worked without this problem.
I have created a German package with version 3.4 of AI and added the 2 merge modules ("msxml4sxs32.msm" and "msxml4sys32.msm"). The build process did not work as you state. Are you sure you have tested this with a non-English project?

can we disable the language check producing the error?
You cannot, because the merge modules are not language neutral. However, you can modify the default language for the merge modules by editing them with Orca (a MSI database editor included in the Platform SDK). You need to change the Language that is listed in the "ModuleSignature" table to zero - this way, the merge modules become language neutral.

An alternative to Orca would be to use a VBScript that performs the above changes. Please let me know if you want to use this approach and I will post the script.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

I didn't retry using the old installer now, but building a kit definitely did work until the upgrade to AI 3.7.

Thanks for the hint with orca, I'm about to try that now.

If you do have a script for performing these edits, I'd appreciate it if you could post it.

Thanks a lot
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

Here is a script that modifies the "ModuleSignature" table for these merge modules. It must be invoked twice (for each merge module) - thus, a batch file may be useful:

Note that this script is provided mainly as an example and I do not recommend using it (the same applies to modifying the MSMs with Orca).

Batch file "msxmlmod.bat":

Code: Select all

@echo off
cscript msxmlmod.vbs msxml4sxs32.msm msxml4sxs32_mod.msm
cscript msxmlmod.vbs msxml4sys32.msm msxml4sys32_mod.msm
Script file "msxmlmod.vbs":

Code: Select all

' msxmlmod.vbs
' 
' Script that modifies the `ModuleSignature` table for these 2 MSMs:
'    `msxml4sxs32.msm` and `msxml4sys32.msm`
'
' Run it with: cscript msxmlmod.vbs <origfile.msm> <modfile.msm>
' Example: cscript msxmlmod.vbs msxml4sxs32.msm msxml4sxs32_mod.msm

Option Explicit

Const msiOpenDatabaseModeDirect = 2
Const msiViewModifyReplace = 4
Const PID_TEMPLATE = 7


' Show help if no arguments or if argument contains ?
Dim argCount:argCount = Wscript.Arguments.Count
If argCount > 0 Then 
  If InStr(1, Wscript.Arguments(0), "?", vbTextCompare) > 0 Then 
    argCount = 0
  End If
End If

If argCount < 2 Then
   Wscript.Echo "Script that modifies the default langauge for " &_
                 "`msxml4sxs32.msm` and `msxml4sys32.msm`" &_
      vbLf & " The 1st argument is the path to the  source MSM to modify" &_
      vbLf & " The 2nd argument is the path to the modified MSM"
   Wscript.Quit 1
End If

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

' Open database
Dim originalPath : originalPath = Wscript.Arguments(0)
Dim databasePath : databasePath = Wscript.Arguments(1)
fso.CopyFile originalPath, databasePath

' Connect to Windows installer object
On Error Resume Next
Dim installer 
Set installer = CreateObject("WindowsInstaller.Installer") : CheckError

Dim database
Set database = installer.OpenDatabase(databasePath, msiOpenDatabaseModeDirect) : CheckError

' Make the changes to the `ModuleSignature` table
Dim thecommand,view,record
thecommand = "SELECT `ModuleID`,`Language`,`Version` FROM `ModuleSignature`"
Set view = database.OpenView(thecommand) : CheckError
view.Execute : CheckError
Set record = view.Fetch : CheckError
record.StringData(2) = "0"
view.Modify msiViewModifyReplace,record
database.Commit

' Also update the Summary Information Stream
Dim sumInfo 
Set sumInfo = database.SummaryInformation(20) : CheckError
sumInfo.Property(PID_TEMPLATE) = "Intel;0" : CheckError
sumInfo.Persist

Set installer = Nothing
Wscript.Quit 0


Sub CheckError
	Dim message, errRec
	If Err = 0 Then Exit Sub
	message = Err.Source & " " & Hex(Err) & ": " & Err.Description & vbcrlf & query
	If Not installer Is Nothing Then
		Set errRec = installer.LastErrorRecord
		If Not errRec Is Nothing Then message = message & vbLf & errRec.FormatText
	End If
	Fail message
End Sub


Sub Fail(message)
	Wscript.Echo message
	Wscript.Quit 2
End Sub
Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
wflohr
Posts: 9
Joined: Tue Aug 09, 2005 7:30 am

Thx for the script!

wolfgang

Return to “Common Problems”