为什么不能通过 GPO 安装多语言 MSI? [英] Why doesn't installation of multi-language MSI work via GPO?

查看:38
本文介绍了为什么不能通过 GPO 安装多语言 MSI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试测试 GPO 部署并遇到了多语言 MSI 部署失败的问题.我有一个多语言 Wix 项目并制作了 2 个 MSI(英语和多语言).我有两个远程 VM,其中一个充当服务器 (Windows Server 2012 R2),它将 GPO 策略推送到另一个充当客户端 VM (Windows 10).

这里有一些线索:

  • MSI 包在用户配置下设置 >政策 >软件设置
  • 通过 GPO,我能够安装英语,但不能安装多语言.
  • 我能够通过手动安装来安装两者.
  • 我只能通过重新安装来安装多语言(手动安装多语言,然后通过 GPO 重新安装,无需先卸载)
  • 在 MSI 日志中(

    这是成功的日志(英文)

    这是失败的日志(多语言)

    解决方案

    2021 年 6 月 23 日更新

    我将问题转发到 Wix github 页面,有人能够帮助找出根本原因.您可以在

    来源:https:///www.advancedinstaller.com/forums/viewtopic.php?f=2&t=29094&p=76677#p76677

    I'm trying to test GPO deployment and came across this issue whereby the multi-language MSI failed to deploy. I have a multi-language Wix project and produced 2 MSIs (English and multi-language). I have two remote VMs with one acting as a server (Windows Server 2012 R2) which will push the GPO policies to the other one acting as a client VM (Windows 10).

    Here are some clues:

    • The MSI package is setup under User Configuration > Policies > Software Settings
    • Via GPO, I was able to install English but not the multi-language one.
    • I was able to install both via manual installation.
    • I was only able to install the multi-language one via re-install (Install the multi-language manually then reinstall it via GPO without uninstalling first)
    • In the MSI log (Setup manually via registry with value voicewarmupx) the first 21 lines are similar for the installation of both MSIs via GPO. (view Appendix below)
    • In the MSI log of the multi-language one, at line 22, there is a line that shows MainEngineThread is returning 1605 (view Appendix). The error code indicates that the program is trying to take action on something that is currently not installed but I'm not sure what to make of it.
    • This WIX project contains custom actions so I have set a piece of code to log the session at the earliest possible time (create a Custom Action before FindRelatedProducts under InstallUISequence node) but it didn't appear in the logs so this could mean that the error happens much earlier.

    What went wrong?

    Appendix

    These are the GPO setting that I have setup for both MSIs in the server under User Configuration > Policies > Software Settings.

    This is the log of the successful one (English)

    This is the log of the unsuccessful one (Multi-language)

    解决方案

    Update 23 June 2021

    I forwarded the issue to Wix github page and someone was able to help find out the root cause. You may view their reply here.

    You advertised the product {4AC8B148-A051-4CC4-86D4-8D2079A8CF54} and then tried to perform a transaction (I assume to transition it from advertised to installed) on the product {e4bedd32-4df6-475e-aef5-b12a58497a1c} (which doesn't exist on the system).

    Basically, when advertising an MSI, any embedded transforms would appear to be ignored for purposes of the identification of the product(s) contained in the MSI file. Yet, when installing, embedded "language transforms" are automatically applied.

    If you had installed the MSIs directly, without first advertising them, that may have worked.

    The solution would then be either simply having a set productID instead of asterisk (*) OR sync the productID of all multi-language MSI's with the main installer's productID after the multi-language MSIs are generated.

    Personally, I went with the second option and I use wirunsql + batch script like this:

    REM Get the product ID from the installer that you want to make into a multi-language installer
    FOR /F %%a IN ('C:\Windows\System32\cscript.exe .\wirunsql.vbs %RELEASEDIR%\en-US\installer.msi "SELECT Value From Property WHERE Property = 'ProductCode'"') DO ( SET ENUSGUID=%%a&& echo ENUSGUID )
    
    REM Use wrunsql.exe to update the product ID of German language installer
    C:\Windows\System32\cscript.exe .\wirunsql.vbs %RELEASEDIR%\de-DE\installer.msi "UPDATE Property SET Value='%ENUSGUID%' WHERE Property='ProductCode'"
    ...
    REM repeat for other installers in other languages
    ...
    REM finally extract the transform files from each installer and inject into the main installer
    

    Old answer

    Apparently, GPO deployment works only if the deployed MSI uses either neutral language (LCID = 0) or English language for installation. If not, GPO will choose the lowest Language Code ID (LCID) in your list of LCIDs as the default language for installation. If the chosen LCID's language pack does not exist in the targeted OS, the deployment will fail. I'm not sure how this is related to error code 1605 though.

    I'm not sure how to do this in Wix Toolset but it can absolutely be done in an MSI editor such as Orca. Just go to View > Summary Information and add 0 to the list of LCIDs in the Languages field as shown below.

    WARNING

    Apparently, setting a neutral language in your MSI seems to make Windows Installer launch in English when running it manually. It doesn't follow the region format of the OS.

    Source: https://www.advancedinstaller.com/forums/viewtopic.php?f=2&t=29094&p=76677#p76677

    这篇关于为什么不能通过 GPO 安装多语言 MSI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆