2016-11-08 134 views
0

我爲我的C#應用​​程序提供了WiX安裝程序。無法使用WiX引導程序安裝軟件包

我有一個用於安裝應用程序,.NET框架和SQL Server的WiX Bootstrapper。

我有2 SQL Server安裝問題。

  • 在安裝了應用程序的PC上,我的引導程序未檢測到它並嘗試重新安裝。在日誌文件中我看到

「註冊表項未找到答案= 'HKEY_LOCAL_MACHINE \ SOFTWARE \微軟\ Microsoft SQL Server的\實例名稱\ SQL'」

但我與註冊表編輯器檢查,我得到了寄存器:

enter image description here

有我的代碼:

<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" /> 

謝謝大家幫忙

+0

我做了一個試驗:運行安裝程序,並說 「NO」,以給予管理員權限。然後我打開日誌文件。錯誤「未找到註冊表項」。存在。也許我應該檢查與管理權限的註冊?我能怎麼做 ? –

+0

Win64 =「是」在您的註冊表搜索。 –

+0

它的作品謝謝你!現在我只需要在沒有它的PC上實現SQL Server安裝 –

回答

0

我不是專家,但是,我對這個工作。

我的代碼是(工作):

<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?> 
+0

我仍然有錯誤'[0D5C:3148] [2016-11-08T15:21:04] i000:找不到註冊表項。鍵='SOFTWARE \ Microsoft \ Microsoft SQL Server \ Instance Names \ SQL''。但是寄存器存在。我不明白,這個錯誤會讓我瘋狂 –

+0

我的exePackage是(小心,它是32位):' '我添加了一個DetectCondition。您可能需要添加SQLServerInstalled的檢測條件? – Bob

相關問題