Hello,
I have created a sample project:
https://www.centrel-solutions.com/temp/project.zip
1. It doesn't matter whether you use Project A (pre-install) or Project B (Feature-based) they both install the SQL Server 17 ODBC driver.
2. Check that the ODBC driver is installed
3. Run the SQL Server 2022 installer and just install the SQL Server" Database Engine Services" keeping the rest of the settings as defaults - it crashes as it can't replace (or maybe update or modify?) the ODBC driver AdvancedInstaller installed.
When you look in the registry the MSI file used to do the installation is in a temporary directory that AdvancedInstaller deletes.
C:\Users\Administrator\AppData\Roaming\Your Company\Project A - PreInstall\prerequisites\Microsoft ODBC Driver 17 for SQL Server\
HOWEVER... I can right click on the ODBC driver in Add/Remove programs and modify it and uninstall it (so it has installed correctly).
It looks like the problem is with the Microsoft SQL Server ODBC Driver - because if you Modify > Repair (no problems) if you right click it and goto Repair then it fails - it looks like the bug is with Microsoft. It must be that SQL Server is also trying to run a Repair directly on this MSI and the bug persists into v18 too.
(Admittedly having the MSI file copied to our install directory and then running it from them would also solve the problem).
Thanks,
Dave