Unable to install SQL Server (Setup.exe) Exit code(Decimal) : -2068052377Error Invalid command line argument.

Farhan Sarang 0 Reputation points
2024-10-04T00:23:22.79+00:00

This is what I have tried.

Removing any file that has sql written in it from the control panel add or remove the program section.

Removing Sql express from Program Files and Program Files (x86) and also removing the C/SQL2022.

Deleting these from the registry if they exist.
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server HKEY_LOCAL_MACHINE\Software\Microsoft\MSSQLServer HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\MSSQLServer HKEY_CURRENT_USER\Software\Microsoft\Microsoft SQL Server

Turning off Firewall

And Finally Rebooting the system and Re-Installing.

Still facing the same problem.

Have also attached the Summary File

User's image

Summary_GhostHunter_20241003_195650.txt

SQL Server | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 128.7K Reputation points MVP Volunteer Moderator
    2024-10-04T22:05:33.7566667+00:00

    My belief is that this is an error that occurs mainly in the situation when a user tried to install SQL Server and it failed with some error. The user might have tried some random cleanup and made renewed attempts. Because the cleanup was incomplete, Setup now fails with another error than it did originally.

    Here is a link to an article that can help you to clean up properly: https://www.sql-easy.com/learn/how-to-uninstall-sql-server/. I have not tried it myself, but I learnt about it from a user who was in a similar situation as yours, and who was able to install SQL Server successfully after following the article.

    If you are on Windows 11, be sure to check out this article before you try again. It discusses a known issue where Windows 11 reports a disk-sector size that SQL Server chokes on. This could be the cause for your original failure. Check out this article, and if needed apply the workarounds it proposes.

    If you make a new attempt after cleanup, and it still fails, you find log files in C:\Program Files\Microsoft SQL Server\nnn\Setup Bootstrap\Log with one folder per attempt. (nnn is a three-digit number that depends on the version of SQL Server you are trying to install). The files of most interest are summary.txt, detail.txt and any file with ERRORLOG in the name. (The latter only appears if Setup came as far as trying to start SQL Server). Feel free to attach these to the thread here.


Your answer

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