I've a WiX Setup for my C# application.
I have a WiX Bootstrapper used to install application, .NET framework and SQL Server.
I have 2 problems with the installation for SQL server.
- On a PC with the application installed, my bootstrapper don't detect it and try to re install. On log file I see
"Registry key not found. Key = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL'"
But I checked with regedit, I got the register :
There is my code :
<util:RegistrySearch
Id="SqlInstanceKeyFound"
Root="HKLM"
Key="SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL"
Value="SQLEXPRESS"
Result="exists"
Variable="SQLServerInstalled" />
- On a PC without the application, the installation failed with error 0x84b40000.
There is my code :
<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" />
Thank you for help