Here is the solution I found Access Database Engine 2016.
Create a folder AccessEngineDatabase
in C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages
Create another folder en
under AccessEngineDatabase
Put both 32 bit and 64 bit redistributable .exes in AccessEngineDatabase folder.
Create product.xml file in AccessEngineDatabase folder with contents below.
Create package.xml file in en
folder with contents shown below.
Restart your VS 2019 again and you'll find 2016 Access Redistributable pre- requirement option in there for setup project.
Thanks,
Ajay
product.xml
<?xml version="1.0" encoding="utf-8" ?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
ProductCode="Access.Database.Engine.2016"
>
<!-- Defines list of files to be copied on build -->
<PackageFiles CopyAllPackageFiles="true">
<PackageFile Name="AccessDatabaseEngine.exe" HomeSite="https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/AccessDatabaseEngine.exe" />
<PackageFile Name="AccessDatabaseEngine_x64.exe" HomeSite="https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/AccessDatabaseEngine_X64.exe" />
</PackageFiles>
<RelatedProducts>
<DependsOnProduct Code="Microsoft.Net.Framework.2.0" />
</RelatedProducts>
<InstallChecks>
<MsiProductCheck Property="IsInstalled"
Product="{90160000-00D1-0409-1000-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">
<!-- Defines a localizable string table for error messages and url's -->
<Strings>
<String Name="DisplayName">Microsoft Access Database Engine 2016</String>
<String Name="Culture">en</String>
<String Name="DotNetFxRequired">Installation of Microsoft Access Database Engine 2016 requires Microsoft .NET Framework 2.0. Contact your application vendor.</String>
<String Name="InvalidPlatformWin9x">Installation of Microsoft Access Database Engine 2016 is not supported on Windows 95. Contact your application vendor.</String>
<String Name="InvalidPlatformWinNT">Installation of Microsoft Access Database Engine 2016 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 2016.</String>
<String Name="AdminRequired">You do not have the permissions required to install this application. Please contact your administrator.</String>
</Strings>
</Package>