I am developing wpf application in C#. I have successfully created the setup project for wpf application in visual studio 2010. I have used MS Access 2010 as a database. It install fine on all computers. But on some computer there is no Microsoft Office installed and on some computer there is lower version of MS Office like MS Office 2003. When I install my application on these computers it gives me connectivity issues. Can you please tell me what should I need to do ? Should I need to include any prerequisite for MS Access 2010 in visual studio 2010 setup project ? If there is any which are they and how to include them ?
2 Answers
I had same problem but I have already created a Bootstrapper package for Microsoft Access Database Engine 2010. I've also included in this package x64 version of it. So it should work on 64 machine also. To include any Prerequisites you must have to add a Bootstrapper Package of that. After that you can get that in your Prerequisite list. That already you know I think. To build a Bootstrapper you need 2 manifest XML files. 1 is product.xml and another is package.xml right? I'm writing all the XML script below.
PRODUCT XML:
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Access.Database.Engine.2010"
>
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="AccessDatabaseEngine.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine.exe" />
<PackageFile Name="AccessDatabaseEngine_x64.exe" HomeSite="http://download.microsoft.com/download/2/4/3/24375141-E08D-4803-AB0E-10F2E3A07AAA/AccessDatabaseEngine_x64.exe" />
</PackageFiles>
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>
<InstallChecks>
<MsiProductCheck Property="IsInstalled"
Product="{90140000-00D1-0409-0000-0000000FF1CE}"/>
</InstallChecks>
<Commands>
<Command PackageFile="AccessDatabaseEngine.exe"
Arguments='/passive'>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<!-- ByPass if the Processor is not x86 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="Intel"/>
<!-- ByPass if we have installed -->
<BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on Win95 -->
<FailIf Property="Version9x" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
<!-- Block install on NT 4 or less -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
<Command PackageFile="AccessDatabaseEngine_x64.exe"
Arguments='/passive'>
<!-- These checks determine whether the package is to be installed -->
<InstallConditions>
<!-- ByPass if the Processor is not x64 -->
<BypassIf Property="ProcessorArchitecture" Compare="ValueNotEqualTo" Value="AMD64"/>
<!-- ByPass if we have installed -->
<BypassIf Property="IsInstalled" Compare="ValueGreaterThan" Value="0" />
<!-- Block install if user does not have admin privileges -->
<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired"/>
<!-- Block install on Win95 -->
<FailIf Property="Version9x" Compare="VersionLessThan" Value="4.10" String="InvalidPlatformWin9x"/>
<!-- Block install on NT 4 or less -->
<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.00" String="InvalidPlatformWinNT"/>
</InstallConditions>
<ExitCodes>
<ExitCode Value="0" Result="Success"/>
<ExitCode Value="1641" Result="SuccessReboot"/>
<ExitCode Value="3010" Result="SuccessReboot"/>
<DefaultExitCode Result="Fail" FormatMessageFromSystem="true" String="GeneralFailure" />
</ExitCodes>
</Command>
</Commands>
</Product>
PACKAGE XML:
<?xml version="1.0" encoding="utf-8" ?>
<Package
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
Name="DisplayName"
Culture="Culture"
LicenseAgreement="license.txt"
>
<PackageFiles>
<PackageFile Name="license.txt"/>
</PackageFiles>
<!-- Defines a localizable string table for error messages and url's -->
<Strings>
<String Name="DisplayName">Microsoft Access database engine 2010 (x86, x64)</String>
<String Name="Culture">en</String>
<String Name="DotNetFxRequired">Installation of Microsoft Access database engine 2010 requires Microsoft .NET Framework 2.0. Contact your application vendor.</String>
<String Name="InvalidPlatformWin9x">Installation of Microsoft Access database engine 2010 is not supported on Windows 95. Contact your application vendor.</String>
<String Name="InvalidPlatformWinNT">Installation of Microsoft Access database engine 2010 is not supported on Windows NT 4.0. Contact your application vendor.</String>
<String Name="GeneralFailure">A fatal error occurred during the installation of Microsoft Access database engine 2010.</String>
<String Name="AdminRequired">You do not have the permissions required to install this application. Please contact your administrator.</String>
</Strings>
</Package>
license.txt
For detail please Log on http://www.microsoft.com/en-us/download/details.aspx?id=13255
Note: I've already tested in my Windows 7 x86 Machine and it works perfect. It doesn't reinstall if already installed. I've no x64 machine so I don't know the Product code of it. But I'm sure it'll work too. It also downloads this package from website and I've tested that.
If you need any further help or complete Bootstrapper Package just let me know.
Cheers.

- 51
- 1
- 4
You migth be able to use Microsoft Access Database Engine 2010 Redistributable
-- Update --
To add custom prerequisites you need to create a Bootstrapper Package here are some instructions:
Creating Bootstrapper Packages
Deploying Custom made Visual Studio prerequisites using Bootstrapper Manifest Generator
-- Update 2 --
For 64-bit implementations see comment from Massood Khaari below.

- 4,950
- 1
- 31
- 31
-
How should I add it in the list of setup prereqisite? – Shailesh Jaiswal Dec 13 '12 at 09:44
-
2@Shailesh Jaiswal: Note that if you use MS Access Database Engine 2010, your application will not work on 64-bit Windows. Although there's a 64-bit version of the engine (AccessDatabaseEngine_x64.exe), beside many difficulties for packaging them for deployment it requires that no 32-bit products of MS Office be installed on system, which is a bigger issue. The workaround is that you use 32-bit version of Access Database Engine 2010 and force your .NET app to run in 32-bit mode (e.g. by selecting x86 platform in Configuration Manager); or better you replace MS Access with a better alternative. – Masood Khaari Sep 25 '13 at 05:18
-
@Massood Khaari, That is what I have done, using the 32-bit version of MS Access Database Engine 2010 and running the application in 32-bit mode (target platform x86) – Jens Granlund Sep 25 '13 at 06:12
-
1Yes, thanks. I just wanted to warn Shailesh and others with similar problem about such a limitation, as one application may have other dependencies requiring 64-bit platform to work correctly. – Masood Khaari Sep 25 '13 at 06:45
-
@Massood Khaari, That's great. It didn't occur to me that there was a 64-bit version as I used the 32-bit version from start. – Jens Granlund Sep 25 '13 at 07:44
-
Yes. Microsoft added the 64-bit version. But it is nearly useless! When trying to install, it prompts to first uninstall all 32-bit Office products, including MS Office 2010 suite. That's disappointing from deployment point of view. – Masood Khaari Sep 25 '13 at 08:57
-
1OK, thanks for the information I added a note in the answer to read your comment. – Jens Granlund Sep 25 '13 at 09:48