[英]Unable to install package with WiX bootstrapper
我的C#應用程序有一個WiX設置。
我有一個WiX引導程序,用於安裝應用程序,.NET框架和SQL Server。
我在安裝SQL Server時遇到2個問題。
“找不到注冊表項。密鑰='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" />
有我的代碼:
<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="NT Authority\Network Service" /AddCurrentUserAsSqlAdmin /IAcceptSqlServerLicenseTerms /skiprules=RebootRequiredCheck"
InstallCondition="VersionNT64 AND NOT SQLServerInstalled" />
謝謝你的幫助
我不是專家,但是,我從事此工作。
我的代碼是(工作):
<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?>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.