[英]Prerequisite installer (setup.exe) results in 'Unable to locate application file [file].msi' after restart
I'm using msbuild to create a Setup.exe that installs the prerequisites for my application. 我正在使用msbuild创建一个Setup.exe来安装我的应用程序的先决条件。 It works great, but when the prerequisites require a reboot, once Windows is back up I get an error that the MSI could not be found: "Unable to locate application file '[file].msi'.
它工作得很好,但是当先决条件需要重新启动时,一旦Windows备份,我就会收到一条错误,指出无法找到MSI:“无法找到应用程序文件'[file] .msi'。
This is my msbuild config file: 这是我的msbuild配置文件:
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<ItemGroup>
<BootstrapperFile Include=".NETFramework,Version=v4.0">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.0</ProductName>
<Install>true</Install>
</BootstrapperFile>
<BootstrapperFile Include="Microsoft.Windows.Installer.4.5">
<Visible>False</Visible>
<ProductName>Windows Installer 4.5</ProductName>
<Install>true</Install>
</BootstrapperFile>
<BootstrapperFile Include="Windows.Imaging.Component">
<Visible>False</Visible>
<ProductName>Windows Imaging Component</ProductName>
<Install>true</Install>
</BootstrapperFile>
</ItemGroup>
<Target Name="Bootstrapper">
<GenerateBootstrapper
ApplicationFile="myAppInstaller.msi"
ApplicationName="MyApp"
BootstrapperItems="@(BootstrapperFile)"
OutputPath=".\"
ComponentsLocation="HomeSite"
Culture="en"/>
</Target>
</Project>
Any idea why and how to fix it? 知道为什么以及如何解决它?
Thanks! 谢谢!
Just found the problem - my installation was executed from WinZip self-extractor which deletes the extracted files once the setup ends. 刚发现问题 - 我的安装是从WinZip自解压程序执行的,一旦设置结束,它就会删除解压缩的文件。 Because one of the prerequisites required a restart, before the computer was restarted, the files had been deleted by the self extractor...
由于其中一个先决条件需要重新启动,因此在重新启动计算机之前,自解压程序已删除了这些文件...
Beware of self extractors folks! 谨防自我提取者们! :)
:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.