0

I am trying to build an installer for my project. The problem is that i am unable to successfully build the installer with the following error:

ERROR: 'msadox28.tlb' should be excluded because its source file 'C:\Program Files (x86)\Common Files\System\ado\msadox28.tlb' is under Windows System File Protection.

From what i can gather, this file has to do with ADOX and ADODB that i use to create, read and write data from a local access database. Excluding this file causes the program to not work at all when it has been installed, because it attempts to create a fresh database from scratch at first launch.

The program works fine and there is no errors with it, but i want to build an installer so that i can send the program to a few users to test it and the database component is the most important part of my project.

Can somebody please assist me with solving this problem?

mjwills
  • 23,389
  • 6
  • 40
  • 63
  • [MDAC components are now part of the Windows OS](https://en.wikipedia.org/wiki/Microsoft_Data_Access_Components#MDAC_2.8) - and that particular file is already installed in both x86 and x64 flavors: (`%CommonProgramFiles(x86)%\System\ado` and `%CommonProgramFiles%\System\ado`). I wonder what you are doing, are you accessing from .NET managed code? [Maybe have a look here with regards to tlb files & runtime use](https://stackoverflow.com/questions/14245692/are-tlb-files-ever-used-at-runtime). – Stein Åsmul Sep 16 '19 at 16:20
  • I might understand this completely the wrong way. All i can say is that i had to add additional references in the references file for both adox an adodb, if that might help. I also have a few different packages installed, but they dont give any problems. To setup an installer, do i need to do some additional work to add those two references to the installer, such as some sort of registration? I am quite confused. – Thys Wentzel Sep 17 '19 at 09:57
  • This is so legacy that I am not sure, but I would try using `procmon.exe` to investigate what registry entries or files are reported as missing or unavailable when your application fails to work. [Quick procmon.exe sample](https://stackoverflow.com/a/47792474/129130). – Stein Åsmul Sep 17 '19 at 11:13
  • Ok so after running procmon and applying the regsvr32.exe filter, what should i do next? How do i run regsvr32.exe correctly? Should i run it with the path of the dependancy? Which entries should i be looking for in procmon? Because there are alot of entries with name not found as a result that doesn't look like they are are part of my program. Sorry for all these questions and thanks for the help in advance. – Thys Wentzel Sep 17 '19 at 12:05
  • I would try to monitor your main executable, if there is one? – Stein Åsmul Sep 17 '19 at 12:13
  • Well the problem occurs when i try to build the setup project. Should i monitor ms visual studio? Also, do i run regsvr32.exe and monitor through procman, or how exactly do i monitor this process? – Thys Wentzel Sep 17 '19 at 12:27
  • Exclude this file from your setup. It already IS on the box, there must be a problem with the operation of your software. Some sort of registration missing or some obscure issue. This file IS NOT to be redistributed and you should heed this warning. – Stein Åsmul Sep 17 '19 at 13:34
  • I am going to go crazy over this. I have excluded the msadox file, but the program wont create the DB, so i included one. Now the bloody thing can't add new records to the DB. To reiterate, the program works fine in visual studio, but the program from the installer has trouble communicating with the database. What the hell am i doing wrong????? Another thing, if that file is not to be included, why is it included by default when i setup a primary output in the setup project??? – Thys Wentzel Sep 17 '19 at 13:54
  • Hard to tell without the source. I know this MDAC stuff is so old that you could hit road-blocks from Microsoft that I don't know about. Maybe you can look for some samples here: https://www.codeproject.com/search.aspx?q=MDAC&x=0&y=0&sbo=kw – Stein Åsmul Sep 17 '19 at 14:07
  • I also use https://github.com to search for concrete samples. – Stein Åsmul Sep 17 '19 at 14:12
  • Ok i may have found another clue. I am using ADOX and ADODB. ADOX has a dll file that is added to the program itself, but ADODB is not. I found out that ADODB is not part of the microsoft.net framework. There is a msado15.dll file that might help to find a solution. – Thys Wentzel Sep 17 '19 at 14:15
  • Nevermind. I removed ADODB, but msadox28.tlb is still added by default to the setup project. I really feel like i want to start tearing hair off of my head........ – Thys Wentzel Sep 17 '19 at 14:46
  • If that is a Visual Studio Installer Setup Project, [maybe try a different MSI tool](https://stackoverflow.com/a/50229840/129130). – Stein Åsmul Sep 17 '19 at 15:16
  • Ok i have removed both ADODB and ADOX from my project and i am able to create the installer. I needed those to create the database, so i should be fine without them as long as i add the database to the installer. Now i am dealing with the next problem, but the primary problem here is sort of either solved or abandoned. I think i am going to close this question. Thanks for the help either way. – Thys Wentzel Sep 17 '19 at 15:34

0 Answers0