【问题标题】:Unable to install package with WiX bootstrapper无法使用 WiX 引导程序安装软件包
【发布时间】:2016-11-08 09:31:08
【问题描述】:

我的 C# 应用程序有一个 WiX 设置。

我有一个用于安装应用程序、.NET 框架和 SQL Server 的 WiX Bootstrapper。

我在安装 SQL Server 时遇到了 2 个问题。

  • 在安装了应用程序的 PC 上,我的引导程序没有检测到它并尝试重新安装。在我看到的日志文件中

“未找到注册表项。Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL'”

但是我用 regedit 查了一下,我得到了寄存器:

这是我的代码:

<util:RegistrySearch
    Id="SqlInstanceKeyFound"
    Root="HKLM"
    Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
    Value="SQLEXPRESS"
    Result="exists"
    Variable="SQLServerInstalled" />
  • 在没有应用程序的 PC 上,安装失败并出现错误 0x84b40000。

这是我的代码:

  <ExePackage Id="SQLExpressx64"
              SourceFile=".\Resources\SQLEXPR_x64_ENU.exe"
              PerMachine="yes"
              Cache="no"
              Compressed="no"
              DownloadUrl="https://download.microsoft.com/download/0/4/B/04BE03CD-EAF3-4797-9D8D-2E08E316C998/SQLEXPR_x64_ENU.exe"
              Permanent="yes"
              Vital="yes"
              InstallCommand="/q /hideconsole /action=Install /features=SQL /instancename=SQLEXPRESS /enableranu=1 /sqlsvcaccount=&quot;NT Authority\Network Service&quot; /AddCurrentUserAsSqlAdmin /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck"
              InstallCondition="VersionNT64 AND NOT SQLServerInstalled" />

感谢您的帮助

【问题讨论】:

  • 我做了一个测试:运行设置并说“不”以授予管理员权限。然后我打开了日志文件。错误“找不到注册表项”。存在。也许我应该检查具有管理员权限的注册表?我该怎么办?
  • Win64="yes" 在您的注册表搜索中。
  • 它有效,谢谢!现在我只需要在没有它的情况下在 PC 上实现 SQL Server 安装

标签: c# sql-server wix bootstrapping


【解决方案1】:

我不是专家,但是,我致力于此。

我的代码是(工作):

<util:RegistrySearch 
   Id="regsearchSqlInstanceFound" 
   Root="HKLM" 
   Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL" 
   Value="$(var.SqlInstanceName)" 
   Result="exists" 
   Variable="SqlInstanceFound"
/>

我的值变量是:

<?define SqlInstanceName=MSSQLSERVER?>

【讨论】:

  • 我仍然有错误[0D5C:3148][2016-11-08T15:21:04]i000: Registry key not found. Key = 'SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL'。但是该寄存器存在。我不明白,这个错误会让我发疯
  • 我的 exePackage 是(注意,它是 32 位的):&lt;PackageGroup Id="SqlServerPackageGroup"&gt; &lt;ExePackage SourceFile="SQLEXPRWT_x86_FRA.exe" DetectCondition="SqlInstanceFound" InstallCommand="$(var.SqlInstallCommand)" UninstallCommand="$(var.SqlUninstallCommand)" RepairCommand="$(var.SqlRepairCommand)" /&gt; &lt;/PackageGroup&gt; 我添加了一个 DetectCondition。您可能需要使用 SQLServerInstalled 添加 detectionCondition?
猜你喜欢
  • 1970-01-01
  • 2019-05-18
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-08-04
  • 1970-01-01
  • 2017-07-11
  • 2020-08-14
相关资源
最近更新 更多