Wednesday, November 6, 2013

Access Database Engine Bootstrapper for Prerequisites

Who works on Visual Studio 2008 and Microsoft Access Database 2007 or above this article basically for them. You can understand how to create Access Database Engine Bootstrapper for Prerequisites. Unfortunately it is not included at all.

Anybody can also download my created complete Bootstrapper Package if you've no time to understand. But as the Title of this blog, I would try to write the syntax to let everybody know.

Download Microsoft Access Database Engine 2010 Redistributable Package from this official link of Microsoft. There are 2 files and you've to download both and the following steps you have to do.

  • Create a folder where ever you want and name it MSAccessDBEng2010. Copy those files you downloaded into this folder.
  • Create an XML file and name it product.xml inside of MSAccessDBEng2010 folder.
  • Write these lines into product.xml given below. Save and Close the file after that.
<?xml version="1.0" encoding="utf-8" ?>

<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>

  • Create a folder name en inside of MSAccessDBEng2010 folder.
  • Create another XML file and name it package.xml inside of en folder. Write below lines into this file. Save and Close this file after that.
<?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>

  • Create a license.txt file inside of en folder and write below line. Save and Close it too.
For detail please log on http://www.microsoft.com/en-us/download/details.aspx?id=13255

  • Make sure that Tree of the folders and files will be like this.

  • Now copy MSAccessDBEng2010 folder including all the folder and files to your C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages location.
  • Now you can get that Package inside of Prerequisites in Visual Studio 2008 like this.

12 comments:

  1. T tried same in VS2010, but its not work. Can you please give solution for VS 2010.

    ReplyDelete
  2. hey, thx for the info, but unfortunately the package isn't displayed in my prerequisites list. i followed instructions 100%, any suggestions? :(

    ReplyDelete
  3. hey guys!
    im trying the same thing... but in VS 2015... this solution not work for me. Anybody has the folders and files generated already?
    please upload it for me.
    reagards!

    ReplyDelete
    Replies
    1. make sure you create the package folder at the location mentioned here https://msdn.microsoft.com/en-us/library/ms165429.aspx?f=255&MSPPError=-2147217396

      Delete
  4. hey guys!
    im trying the same thing... but in VS 2015... this solution not work for me. Anybody has the folders and files generated already?
    please upload it for me.
    reagards!

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Hi, i have a problem after the build. When i execute the setup.exe it tries to download the file prerequisite "AccessDatabaseEngine.exe" and then it fails. Any hint?

    [END PART OF LOGS]
    Result of checks for command 'MSAccessDBEng2016\AccessDatabaseEngine.exe' is 'Install'
    'Microsoft Access database engine 2016 (x86, x64)' RunCheck result: Install Needed
    Verifying file integrity of C:\Users\ME\AppData\Local\Temp\VSD1880.tmp\MSAccessDBEng2016\AccessDatabaseEngine.exe
    WinVerifyTrust returned -2146762749
    Subject form unknown
    Error: Setup has detected that the file 'C:\Users\ME\AppData\Local\Temp\VSD1880.tmp\MSAccessDBEng2016\AccessDatabaseEngine.exe' has changed since it was initially published.

    ReplyDelete
  7. For anyone trying to bootstrap the 2016 engine, I believe you want to edit the product.xml such that:

    HomeSite=https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/AccessDatabaseEngine.exe

    (for the 32-bit version)

    and

    HomeSite=https://download.microsoft.com/download/3/5/C/35C84C36-661A-44E6-9324-8786B8DBE231/AccessDatabaseEngine_X64.exe

    (for the 64-bit version)

    Also the license.txt should point to:

    https://www.microsoft.com/en-us/download/details.aspx?id=54920

    and also update 2010 to 2016 in all of the obvious places.

    The DependsOnProduct in the product.xml might need to reference something newer, and I don't know what the Product attribute of the MsiProductCheck element should be now.

    Good Luck,
    -Jeff

    ReplyDelete
    Replies
    1. I think this is what you want for the Product attribute of the MsiProductCheck element:

      90160000-00D1-0409-0000-0000000FF1CE

      Delete
  8. Thanks for sharing this. However, I tried that on VS 2019 and didn't work. It didn't show up in prereq window. I tried eula.rtf in place of .licence.txt but no avail. If you have downloadable files, I'll appreciate that.

    ReplyDelete
  9. TiGMA - Home of Titanium Ecosport for Desktop - iTanium-arts
    TiGMA titanium tent stakes is the world leading best titanium flat iron manufacturer of advanced tools for your mens black titanium wedding bands home-office. TiGMA apple watch 6 titanium provides the necessary performance with a titanium vs stainless steel true high-performance

    ReplyDelete