项目已成功构建,但是当我运行生成的MSI时,它会进行检查并收集信息,然后关闭,安装程序不会出现。在任务管理器中,我可以看到msiexec.exe正在运行。怎么了?这是我的代码。
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="Installer" Language="1033" Version="1.0.0.0" Manufacturer="Microsoft" UpgradeCode="d52283dd-2703-42a4-b3ef-73726d5e4ec6">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/>
<Feature Id="ProductFeature" Title="Installer" Level="1">
<ComponentGroupRef Id="ProductComponents" />
</Feature>
</Product>
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLFOLDER" Name="Installer" />
</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="ProductComponent" Guid="{CB56C523-A71F-41C2-8C67-30A864FF253F}">
<File Source="$(var.EJMS.TargetPath)" KeyPath="yes"/>
</Component>
</ComponentGroup>
</Fragment>
</Wix>
答案 0 :(得分:2)
从命令行尝试运行
msiexec / i installerName.msi / l * v log.txt
查看安装程序日志,看看它是否被某个地方赶上了。安装可能会无声地失败,甚至成功。您没有UI设置,因此它将以静默方式完成安装。检查返回值3 ,因为它通常表示失败