Error attempting to install SQL Server Express Edition

Scott Gillen 0 Reputation points
2024-12-12T20:58:46.34+00:00

Hello, I'm currently trying to install SQL Server Express Edition on a Windows Machine which has previously had the Developer Edition installed on it.

To uninstall Developer Edition I did the following

Went to Apps & Features, searched for 'sql', and deleted any SQL-related programs from Windows.

Went to the Windows Registry, and deleted

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall (any keys related to SQL Server)
  • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services (again, anything related to SQL Server)

I then rebooted my machine, and deleted the SQL Server folder from C:\Program Files and C:\Program Files (x86).

I was hoping that by this stage, there would be no remnants of SQL Server from the previous installation, and that I would be in a good place to do a clean install.

I then downloaded SQL Server Express edition from the Microsoft website (SQL Server Downloads | Microsoft), and ran it as Administrator.

However, after several attempts and a couple of hours of trying, I can't get it to install. I get an error message from the SQL Server installation wizard, and the message I'm getting is: Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

I'm wondering if I need to do anything differently when I'm installing? Or if there's anything else I need to do to remove the previous installation of SQL Server?

As an extra measure, I've also uninstalled SQL Server Management Studio, just in case that somehow had something which was interfering with the installation process, but I'm still getting the same results as before.

For more info, I've got a Summary.txt file, and a details file which I've attached

Summary_HOME-DESKTOP_20241212_203818.txt

Detail.txt

Any help anyone could provide would be greatly appreciated.

Thanks

SQL Server Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2024-12-12T22:26:27.8633333+00:00

    This is an error I've seen many times here in the forums, and over time the suspicion has grown that this is due to installing and re-installing with some random cleanup in between. Your post confirms that feeling. (Most of the time when people do this is because the initial attempt to install fail.)

    I would guess that you have been able to achieve some mismatch with the installer cache.

    What you should have done is to simply install Express Edition. You can have multiple instances of SQL Server installed, so there is no direct need to uninstall the instance running Developer Edition. And if you absolutely did not want to keep it, you should just have uninstalled without deleting folders or registry entries. At least, the few times I have uninstalled and re-installed, this is what I have done and it has worked.

    You could have a look at this article: https://www.sql-easy.com/learn/how-to-uninstall-sql-server/ Some posters have been able to resolve their situation with help of it, but I have not followed it myself.

    0 comments No comments

  2. ZoeHui-MSFT 41,491 Reputation points
    2024-12-13T08:40:16.92+00:00

    Hi @Scott Gillen,

    Seems like incomplete uninstallation of SQL server and you are not able to install in SQL server in the machine.

    You can download this troubleshooter. It help you automatically repair issues when you're blocked from installing or removing programs. It also fixes corrupted registry keys.

    https://support.microsoft.com/en-us/topic/fix-problems-that-block-programs-from-being-installed-or-removed-cca7d1b6-65a9-3d98-426b-e9f927e1eb4d

    Remember to restart your machine and re-install for a try.

    Regards,

    Zoe Hui


    If the answer is helpful, please click "Accept Answer" and upvote it.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.