简体   繁体   English

先决条件安装程序(setup.exe)导致重新启动后无法找到应用程序文件[file] .msi'

[英]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.

相关问题 自定义MSI中的SQL Server setup.exe导致StackOverflowException - SQL Server setup.exe within a custom msi causes StackOverflowException Setup.exe根据区域设置调用msi - Setup.exe calling msi based on Regional setting InstallShield LE构建.msi而不是setup.exe - InstallShield LE to build an .msi instead of setup.exe MSI安装程序文件名中的exe版本(VS 2010) - Exe version in MSI installer file name (VS 2010) 如何使MSI安装程序自动运行包含的.exe文件? - How to make msi installer automatically run included .exe file? 有没有办法确保 MSI 安装程序每次都更新 .exe 文件? - Is there a way to ensure an MSI installer updates the .exe file every time? 如何使用VS 2010在Setup Project的.msi输出文件中添加必备安装? - How to add prerequisite installation in the .msi output file of Setup Project using VS 2010? 是否有任何指向Visual Studio中的安装项目创建的setup.exe文件? - Is there any point to the setup.exe file created by a setup project in Visual Studio? 可以配置ClickOnce项目,以便以不同于setup.exe的方式调用下载的文件吗? - Can a ClickOnce project be configured so that downloaded file is called differently from setup.exe? Windows安装程序和安装应用程序到一个文件? - Windows installer and setup application into one file?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM