我正在制作一個安裝程式,除了進行開發之外,它還需要自動安裝“Microsoft Access 資料庫引擎 2010”(MADE2010),這是由于資料庫連接。我遇到的問題是我的計算機已格式化,當我想再次加載專案時,它在 MADE2010 先決條件中顯示為未啟用的警告,我洗掉了選擇,再次加載 MADE2010 XML 和安裝程式,現在我可以了t 讓它們重新加載到先決條件串列中。我已經上傳了檔案夾
* C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages*
在其中加載“product.xml”檔案,“AccessDatabaseEngine.exe”安裝程式(因為我只需要 x86)并創建一個名為“en”的檔案夾,其中包含兩個檔案,一個名為“license.txt”和“package . xml”,但未加載 Visual Studio (2017) 先決條件中的 MADE2010。
如果我犯了錯誤,你能指導我嗎?
這是“package.xml”檔案:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Access.Database.Engine.2010"
>
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="AccessDatabaseEngine.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe" />
</PackageFiles>
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>
<InstallChecks>
<MsiProductCheck Property="IsInstalled"
Product="{90140000-00D1-0409-0000-0000000FF1CE}"/>
</InstallChecks>
<Commands>
<Command PackageFile="AccessDatabaseEngine.exe"
Arguments='/passive'>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<!-- ByPass if the Processor is not x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
<!-- ByPass if we have installed -->
<BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on Win95 -->
<FailIf Property="Version9x" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
<!-- Block install on NT 4 or less -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
這是“product.xml”檔案:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Access.Database.Engine.2010"
>
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="AccessDatabaseEngine.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe" />
</PackageFiles>
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>
<InstallChecks>
<MsiProductCheck Property="IsInstalled"
Product="{90140000-00D1-0409-0000-0000000FF1CE}"/>
</InstallChecks>
<Commands>
<Command PackageFile="AccessDatabaseEngine.exe"
Arguments='/passive'>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<!-- ByPass if the Processor is not x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
<!-- ByPass if we have installed -->
<BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on Win95 -->
<FailIf Property="Version9x" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
<!-- Block install on NT 4 or less -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
uj5u.com熱心網友回復:
我發現了錯誤。
在制作整個包(包、產品、許可證、語言和可執行檔案)時,必須在 SDKs 檔案夾之外進行(在您的桌面上參考),因為如果在內部進行,無論您配置多少前提條件的更改都會反映。除此之外,在部署屬性中,在:
屬性 > 雜項 > 本地化
確保選擇您需要的語言。就我而言,我使用的是英語(美國),因此您選擇“英語(美國)”,在您的檔案夾中,您必須創建一個名為“en”的檔案夾,其中包含“package.xml 和 license.txt”檔案或 EULA。
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/490873.html
上一篇:成功構建后二進制檔案丟失?
下一篇:為什么會出現這個無限回圈?
