Share via
Holbrook, John 1Reputation point
We have three C# application that use SQL Server Express 2019. We are installing on 64-bit machines running Windows 10 Enterprise version 2004. As it happens, the three applications each use a different installer, one uses Inno Setup, one uses WiX and the other uses NSIS. All three wrap the installer for SQL Server Express 2019. All three have the same issue. The first install works fine, then as part of our testing, we uninstall the instance and the uninstall appears to work. However if we try to reinstall, it fails with an exit code of 0xC0000005. After that, we have tried everything to completely remove SQL Server and have not been able to fix the issue. The only way to recover from this is to reimage the machine.
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,171 questions
Sign in to follow
0{count} votes
Erland Sommarskog 105KReputation points • MVP
2021-06-08T21:29:15.39+00:00 Have you check the log files in C:\Program Files\Microsoft SQL Server\150\Setup Bootstrap\Log? There is one folder for each setup operation.
Holbrook, John 1Reputation point
2021-06-08T22:11:37.23+00:00 Unfortunately, the reinstall does not get far enough to create that folder, I only have the SqlSetup.log file:
06/03/2021 16:09:26.034 Attempting to run user requested action from media ScenarioEngine.exe
06/03/2021 16:09:26.034 Attempting to launch process C:\Sievers\DataPro2\SQLEXPR_x64_ENU\x64\ScenarioEngine.exe
06/03/2021 16:09:27.547 Process returned exit code: 0xC0000005
06/03/2021 16:09:27.547 Media ScenarioEngine.exe returned exit code: 0xC0000005
06/03/2021 16:09:27.547 Attempting to release setup mutex
06/03/2021 16:09:27.547 Setup mutex has been released
06/03/2021 16:09:27.547 Setup closed with exit code: 0x84C40013
06/03/2021 16:09:27.547 ======================================================================Erland Sommarskog 105KReputation points • MVP
2021-06-09T21:24:20.733+00:00 I guess then, it's time to get Process Monitor from www.sysinternals.com to see what Setup is trying to access and where it fails with Access denied.
Keep in mind that Access denied can either be a permissions issue, or that a file is locked by another process.
CarrinWu-MSFT 6,866Reputation points
2021-06-15T01:37:17.937+00:00 Hi @Holbrook, John , we have not get a reply from you. Did any answers could help you? If there have any answers helped you, please do "Accept Answer". If not, please let us know. By doing so, it will benefit for community members who have this similar issue. Your contribution is highly appreciated. Thank you!
Holbrook, John 1Reputation point
2021-06-15T13:45:58.067+00:00 Carrin, still working the issue. I think Process Monitor has the most potential to find the cause, but I just haven't had time to work on it lately.
Sign in to comment
1 answer
Sort by: Most helpful
Most helpful Newest Oldest
CarrinWu-MSFT 6,866Reputation points
2021-06-09T05:09:45.507+00:00 Hi @Holbrook, John ,
Welcome to Microsoft Q&A!
Please follow below steps to delete the left components first:
- Uninstall the existing SQL Server and all the components from the add remove program.
- Backup the registry.
- Delete the following keys using regedit:
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
--HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer - Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing SQL Server.
- Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server.
- Rename all the SQL Server folders in the computer.
- Reboot the machine.
Setup closed with exit code: 0x84C40013
This error maybe caused by permission issue. Have you right click and select 'run as a administrator' when you install SQL Server? Please refer to this blog, it might be helpful.
Best regards,
CarrinIf the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.Holbrook, John 1Reputation point
2021-06-09T18:57:21.717+00:00 Carrin, thanks for your post, unfortunately that is the first thing I tried and it did not fix the issue.
CarrinWu-MSFT 6,866Reputation points
2021-06-10T01:57:31.267+00:00 06/03/2021 16:09:26.034 Attempting to run user requested action from media ScenarioEngine.exe
06/03/2021 16:09:26.034 Attempting to launch process C:\Sievers\DataPro2\SQLEXPR_x64_ENU\x64\ScenarioEngine.exe
06/03/2021 16:09:27.547 Process returned exit code: 0xC0000005
06/03/2021 16:09:27.547 Media ScenarioEngine.exe returned exit code: 0xC0000005According your information, it seems that there is no permission to access C:\Sievers\DataPro2\SQLEXPR_x64_ENU\x64\ScenarioEngine.exe, and ScenarioEngine.exe will check glob rule, check if a patch needs to be installed and so on. So please check you have enough permission to access there. And as Erland mentioned, you could use Process Monitor v3.82 to get more detail of the process.
Sign in to comment
Sign in to answer