2010-05-27 8 views
5

Ich baue ein Installationsprogramm, und ich möchte SQL Server Compact Edition 3.5 SP2 Bootstrap. Das Problem ist, dass ich nach dem Registrierungsschlüssel HKLM\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU\DesktopRuntimeVersion suche. Der Grund, dass ein Problem besteht darin, dass für die 64-Bit-Maschinen SQL CE erfordert, dass sowohl die 32-Bit- und 64-Bit-Installateuren ausgeführt werden. Sie können die 64-Bit-Version erst installieren, wenn die 32-Bit-Version installiert ist.Erkennen, ob SQL Server Compact Edition 3.5 SP2 x64 installiert ist?

Sobald die 32-Bit-Version installiert ist, wird der Registrierungsschlüssel ausgefüllt und mein Bootstrapper, dotNetInstaller erkennt, dass der Registrierungsschlüssel vorhanden ist und die x64-Version nie installiert ist.

Alle Ideen, wie wenn die x64-Version sogar sagen, ob die x32 installiert ist installiert ist?

Antwort

7

x64-System mit nur x86 Runtime installiert:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU] 
"DesktopRuntimeVersion"="3.5.8080.0" 
"DesktopRuntimeServicePackLevel"="2" 

x64-System sowohl mit x86 und x64 installiert:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\ENU] 
"DesktopRuntimeVersion"="3.5.8080.0" 
"DesktopRuntimeServicePackLevel"="2" 
"DesktopRuntimeVersion_x64"="3.5.8080.0" 
+0

Perfect! Vielen Dank! –

+0

Beachten Sie, dass das SP2 x64-Paket wird nicht installiert, es sei denn, das x86-Paket installiert wird - weitere Informationen: http://erikej.blogspot.com/2010/05/how-to-detect-if-x64-sql-compact-35- sp2.html – ErikEJ

1

Einige Code testen, ob SQL CE 3.5 SP2 installiert ist MSBuild mit:

<PropertyGroup> 
    <SSCE35sp2Installed Condition="'$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\[email protected])' == '3.5.8080.0' And '$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server Compact Edition\v3.5\[email protected])' == '2'">true</SSCE35sp2Installed> 
    <SSCE35sp264Installed Condition="'$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SQL Server Compact Edition\v3.5\[email protected]_x64)' == '3.5.8080.0'">true</SSCE35sp264Installed> 
</PropertyGroup> 

ich bin nicht sicher, wie viele der Registrierungswerte überprüft werden müssen. Zum Beispiel sollte der Wow6432Node DesktopRuntimeServicePackLevel-Wert zusätzlich zu den oben genannten überprüft werden?

Verwandte Themen