I have a Windows form application. It reads data from MS Access Database. I did install MS Access database engine (AccessDatabaseEngine_X64.exe) in my system. It works well. As this application can be used by anyone internally they have to go through the hassle of installing driver before start using the application. To overcome this issue, I created Setup installer for my project using Visual Studio "Setup Project" in VS 2017. I added AccessDatabaseEngine_X64.exe under Custom Actions as prerequisite. It failed to do so because while running installer it launches another installer and pops up an error saying another instance of installer is running. Please close this to continue. How can I embed this in my installer? So that users need not to install Access engine manually to use this application.
2 Answers
Most items like this are installed as prerequisites by a setup.exe that the setup project will build if you do that in the project properties. There are a number of reasons for this, the main one being that you can't install MSI setups from within MSI setups.
Your prerequisite is not in the standard list of prerequisites, so you'd need to create your own bootstrapper data, starting here:
https://msdn.microsoft.com/en-us/library/ms165429.aspx
and creating the product and package manifests. This seems to be a good starting point:
http://itsyntax.blogspot.com/2013/11/access-database-engine-bootstrapper-for.html

- 20,260
- 1
- 18
- 28
You can get around your problem by adding Microsoft Access Database Engine 2010 as prerequisites in Setup project, The following link shows you how to do so, but be careful, if you use VS2017 then the path is different, the path for VS2017 is:
"C:\Program Files (x86)\Microsoft SDKs\ClickOnce Bootstrapper\Packages"
not
"C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages"
Also I noticed that in some cases you have to install "AccessDatabaseEngine.exe" not "AccessDatabaseEngine_X64.exe" on user's machine, even if it is a 64-bit windows!!!
Here is the article including a video showing how to do all this in a step by step:
https://csharp-tutorials1.blogspot.com/2017/12/add-microsoft-access-engine-2010-as.html
Best regards

- 11
- 2