4

Is it possible to read an access database while running an installer built with WIX? I see that there is the SqlExtension and the UtilExtension parts, but all of the examples seem to think it's a SQL database. I would like to read records from a table during the installation and, for each record, prompt the installer for data. I am assuming that I can perform a file search to locate the location of the MDB, and I will know the password required to access the table being read.

I haven't used a lot of WIX, so any help to work this out would be greatly appreciated.

EdH
  • 4,918
  • 4
  • 24
  • 34

2 Answers2

2

As the Wix SqlExtension doesn't allow you to set the provider type I very much doubt this is possible. Also you won't be able to loop and prompt for the user for data within the Wix installer as AFAIK this isn't supported (well I've never worked out how to do it!).

Depending on what you are doing with the data you want to prompt for, you have a couple of options.

  1. If you need to save the data back into the Access Db, I would say your best option for this would be to incorporate the data setup on first run of your application (or create a one-time run setup application) and use wix to automatically run at the end it at the end of your install.
  2. The second option would be to use Burn to create a more user-friendly .net based installer that bootstraps the msi created in your application whilst also capturing the data you require and doing whatever else you need it to do.
caveman_dick
  • 6,302
  • 3
  • 34
  • 49
  • Thanks for the help. I don't need to write back to the access database, just use the data to configure some settings which end up in some registry settings. I'll look into Burn to see what that gives me. Thanks heaps for the point in the right direction. – EdH Jan 04 '13 at 10:40
1

You could write a custom action to query the MDB and set MSI properties. Then you could use thoses properties in Registry elements.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100