Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Before going into further details first “ Disclaimer : This is just to help and does not guaranty that this is approved my employer or me J”
Location of SQL Compact Bootstrapper
<BootstrapperDir> \Packages\SQL Server Compact Edition\ <LocaleCultureDir> \
Where,
· <BootstrapperDir> can be found by reading [HKLM\Software\Microsoft\GenericBootstrapper\3.5]path value otherwise its default value is %ProgramFiles%\Microsoft SDKs\Windows\v6.0A\Bootstrapper\ .
· <LocaleCultureDir> is culture specific dir, ex: EN, DE, zh-CHS, zh-CHT, …
Follow the below steps, If you have an ‘Any CPU’ ClickOnce application using SQL Compact 3.5 SP1, for which you want to install SQL Compact x64 MSI on 64-bit machine.
Note: It is required to install both x86 and x64 MSIs on 64-bit OS, since x86 MSI is pre-requirement for x64 MSI.
Steps:
1) Download the SQL Compact 3.5 SP1 x64 MSI and place it under <BootstrapperDir>\Packages\SQL Server Compact Edition\<LocaleCultureDir>\
2) ClickOnce setup.exe is always runs as WoW process on x64 OS, that’s why reading a registry key is not useful for x64 MSI. We can achieve the install check using <MsiProductCheck> element.
Edit the <BootstrapperDir>\Packages\SQL Server Compact Edition\<LocaleCultureDir>\Package.xml file with following details
· As part of <InstallChecks> element add <MsiProductCheck> as below
<InstallChecks>
---
<MsiProductCheck Property="SQLCompactRunTimex64Installed" Product=" [ProductCode] " />
---
</InstallChecks>
[ProductCode] is the Product Code/GUID of the x64 MSI. Depending on locale, get it from below table for 3.5 SP1 x64 release.
You can use Orca.exe to get the ProductCode property of a MSI.
Locale |
Three letter locale Id |
Product Code |
Chinese |
CHS |
{8DD60183-76ED-4416-8C9C-E5A39E1826EF} |
Chinese (Taiwan) |
CHT |
{A423B3FB-C9E6-4953-9A83-2A5F45CAF466} |
German |
DEU |
{77CB2F9F-67C5-4ADA-9321-B30C9C64727E} |
English |
ENU |
{F83779DF-E1F5-43A2-A7BE-732F856FADB7} |
Spanish |
ESN |
{5B32AC72-6251-47F4-BD1B-AD479E3EEBA9} |
French |
FRA |
{A64CF374-A3DA-4B1E-A42A-6394C48F431A} |
Italian |
ITA |
{4634B103-984E-4F31-BD80-DCD83AEEEF85} |
Japanese |
JPN |
{1A22CAF6-E6FD-4D65-AEBA-F28D23B68EBF} |
Korean |
KOR |
{38514244-6C25-42EC-B144-276F6DDAC9CE} |
Portuguese (Brazil) |
PTB |
{C8445DBB-783F-4804-B373-D5CDC0614E60} |
Russian |
RUS |
{CAA59A81-E35A-4582-80FF-F19520FFF60F} |
3) Add <PackageFile> element for x64 MSI. Replace [ ThreeLetterLocaleID] with three letter locale id mentioned in above table.
<PackageFiles>
---
<PackageFile Name="SSCERuntime- [ ThreeLetterLocaleID] -x64.msi" PublicKey="3082010a0282010100a2db0a8dcfc2c1499bcdaa3a34ad23596bdb6cbe2122b794c8eaaebfc6d526c232118bbcda5d2cfb36561e152bae8f0ddd14a36e284c7f163f41ac8d40b146880dd98194ad9706d05744765ceaf1fc0ee27f74a333cb74e5efe361a17e03b745ffd53e12d5b0ca5e0dd07bf2b7130dfc606a2885758cb7adbc85e817b490bef516b6625ded11df3aee215b8baf8073c345e3958977609be7ad77c1378d33142f13db62c9ae1aa94f9867add420393071e08d6746e2c61cf40d5074412fe805246a216b49b092c4b239c742a56d5c184aab8fd78e833e780a47d8a4b28423c3e2f27b66b14a74bd26414b9c6114604e30c882f3d00b707cee554d77d2085576810203010001" />
</PackageFiles>
4) Add <Command> elements for x64 MSI.
</Commands>
<!-- Install case for the x64 redist -->
<Command PackageFile="SSCERuntime- [ ThreeLetterLocaleID] -x64.msi" Arguments="">
<InstallConditions>
<!-- ByPass if we have installed the x64 redist -->
<BypassIf Property="SQLCompactRunTimex64Installed" Compare="ValueGreaterThan" Value="0" />
<!-- Install only on AMD64 Processor -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" />
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="4123" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="Anunexpected" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
<!-- Reinstall/Repair case for the x64 redist -->
<Command PackageFile="SSCERuntime- [ ThreeLetterLocaleID] -x64.msi" Arguments="REINSTALL=ALL">
<InstallConditions>
<!-- Check if we haven’t installed the x64 redist, no need to repair it -->
<InstallIf Property="SQLCompactRunTimex64Installed" Compare="ValueGreaterThan" Value="0" />
<!-- Install only on AMD64 Processor -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64" />
<!-- This is the actual condition for reinstalling the x64 MSI -->
<BypassIf Property="ENU_INST_GAC" Compare="ValueExists" />
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success" />
<ExitCode Value="1641" Result="SuccessReboot" />
<ExitCode Value="3010" Result="SuccessReboot" />
<ExitCode Value="4123" Result="SuccessReboot" />
<DefaultExitCode Result="Fail" String="Anunexpected" FormatMessageFromSystem="true" />
</ExitCodes>
</Command>
</Commands>
5
5) For making AnyCPU SQL Compact 3.5 SP1 Clickonce app to download 64-bit and 32-bit MSIs from microsoft download site (In this case, you can skip step 1), you need to do following additial things.
a) Add HomeSite attribute to the 64-bit <PackageFile>
element.
<PackageFiles>
---
<PackageFile Name="SSCERuntime- [ ThreeLetterLocaleID] -x64.msi"
HomeSite="HomeSiteName_64"
PublicKey="3082010a0282010100a2db0a8dcfc2c1499bcdaa3a34ad23596bdb6cbe2122b794c8eaaebfc6d526c232118bbcda5d2cfb36561e152bae8f0ddd14a36e284c7f163f41ac8d40b146880dd98194ad9706d05744765ceaf1fc0ee27f74a333cb74e5efe361a17e03b745ffd53e12d5b0ca5e0dd07bf2b7130dfc606a2885758cb7adbc85e817b490bef516b6625ded11df3aee215b8baf8073c345e3958977609be7ad77c1378d33142f13db62c9ae1aa94f9867add420393071e08d6746e2c61cf40d5074412fe805246a216b49b092c4b239c742a56d5c184aab8fd78e833e780a47d8a4b28423c3e2f27b66b14a74bd26414b9c6114604e30c882f3d00b707cee554d77d2085576810203010001" />
</PackageFiles>
b) Add <String> for HomeSiteName_64 in <Strings>
<Strings>
---
<String Name="HomeSiteName_64"> [x64MSIDownloadURL] </String>
---
</Strings>
In place of [x64MSIDownloadURL] put download URL for locale specific x64 Runtime MSI.
Below is the list of locale specific download URLs for x64 3.5 SP1 Runtime MSIs.
Portuguese (Brazil): https://download.microsoft.com/download/D/3/8/D388E5C0-8671-4F6A-8A05-86B9470B4E97/SSCERuntime-PTB-x64.msi
Chinese (Taiwan): https://download.microsoft.com/download/D/E/B/DEB711BD-FE6A-45E9-AA15-D9901E8458C3/SSCERuntime-CHT-x64.msi
ClickOnce Reference: https://msdn.microsoft.com/en-us/library/ms229223(VS.80).aspx
Thanks
Manikyam Bavandla
Comments
- Anonymous
October 06, 2008
PingBack from http://blog.a-foton.ru/index.php/2008/10/06/how-to-authoring-a-64-bit-clickonce-bootstrapper-package-in-visual-studio-2008-sp1/