Wix installer failing on Windows Server 2012 R2

假装没事ソ 提交于 2021-01-28 08:58:03

问题


I have an installer for a windows service which works as expected on Windows 10 but fails on Windows Server 2012.

The installer code is this ->

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Product Id="*" Name="IWErpnextPoll" Language="1033" Version="1.1.0" Manufacturer="IWW" UpgradeCode="ccc3c2fe-d20f-45ce-b978-4dc7c84ce6c8">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />

        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <MediaTemplate />

        <Feature Id="ProductFeature" Title="IWERPNextPoll_Setup" Level="1">
            <ComponentGroupRef Id="ProductComponents" />
        </Feature>
    </Product>

    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLFOLDER" Name="IWErpnextPoll" />
            </Directory>
        </Directory>
    </Fragment>

    <Fragment>
        <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
            <!-- TODO: Remove the comments around this Component element and the ComponentRef below in order to add resources to this installer. -->
            <Component Id="Sage.Peachtree.API.dll">
                <File Source="$(var.IWErpnextPoll.TargetDir)Sage.Peachtree.API.dll" />
            </Component>
            <Component Id="Sage.Peachtree.API.Resolver.dll">
                <File Source="$(var.IWErpnextPoll.TargetDir)Sage.Peachtree.API.Resolver.dll" />
            </Component>
            <Component Id="Serilog.dll">
                <File Source="$(var.IWErpnextPoll.TargetDir)Serilog.dll" />
            </Component>
            <Component Id="Serilog.Sinks.File.dll">
                <File Source="$(var.IWErpnextPoll.TargetDir)Serilog.Sinks.File.dll" />
            </Component>
            <Component Id="RestSharp.dll">
                <File Source="$(var.IWErpnextPoll.TargetDir)RestSharp.dll" />
            </Component>
            <Component Id="ProductComponent">
                <File Source="$(var.IWErpnextPoll.TargetPath)" />
                <ServiceInstall Id="ServiceInstaller" Name="IWErpnextPoll" Type="ownProcess" Vital="yes" Description="Custom ERPNext connector for Sage 50." Start="auto" Account=".\LocalSystem" ErrorControl="normal" Interactive="no" />
                <ServiceControl Id="StartService" Name="IWErpnextPoll" Stop="both" Start="install" Remove="uninstall" Wait="yes" />
            </Component>
        </ComponentGroup>
    </Fragment>
</Wix>

On server 2012, the service does not start and ultimately fails with this error message:

I'm building it on windows 10 and it is tested on other windows 10 computers as OK. Unfortunately, I don't have access to Windows Server 2012 so I can't experiment. Is there anything specific to server 2012 that I need to add? Or perhaps some condition that I need to verify on the server for the installation to complete smoothly?

来源:https://stackoverflow.com/questions/62692009/wix-installer-failing-on-windows-server-2012-r2

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!