Unable to install sql server(setup.exe) Exit code(decimal): -206805377Error description: invalid command line argument Consult the windows installer SDK for detailed command line help

Alfalah, Mohammad 0 Reputation points
2025-02-12T07:18:33.11+00:00

I've been trying to find a solution for this but i can't at all. I tried deleting everything all files and programs and reinstalling. I even deleted the files from registry editor. I also cleaned my recycling bin but sill the issue presists. I changed the instance name and ID and chose mixed mode. However it still doesn't work.Action required:

Use the following information to resolve the error, and then try the setup process again.

Feature failure reason:

An error occurred during the setup process of the feature.

Error details:

§ Error installing SQL Server Database Engine Services Instance Features

Invalid command line argument. Consult the Windows Installer SDK for detailed command line help.

Error code: 1639

Log file: C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\20250212_020709\sql_engine_core_inst_Cpu64_1.log

Visithttps://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=sql_engine_core_inst.msi%400x162A16FE%400x1639 to get help on troubleshooting.

It also gave these errors during the installation:

TITLE: Microsoft SQL Server 2022 Setup


The following error has occurred:

The MOF compiler could not connect with the WMI server. This is either because of a semantic error such as an incompatibility with the existing WMI repository or an actual error such as the failure of the WMI server to start.

For help, click: https://go.microsoft.com/fwlink?LinkID=2209051&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=0xA60E3551%25400xD3BEBD98%25401211%25401


BUTTONS:

OK


TITLE: Microsoft SQL Server 2022 Setup


The following error has occurred:

PerfLib 2.0 counter removal failed with exit code -2147024894. Command line: C:\WINDOWS\system32\unlodctr.exe /m:hkengperfctr.xml from directory C:\Program Files\Microsoft SQL Server\160\Shared.

For help, click: https://go.microsoft.com/fwlink?LinkID=2209051&ProdName=Microsoft%20SQL%20Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=16.0.1000.6&EvtType=0x590D6427%25400x24BDAA65%25401260%25401


BUTTONS:

OK


Screenshot 2025-02-12 021205

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,474 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. ZoeHui-MSFT 40,511 Reputation points
    2025-02-12T07:39:23.6733333+00:00

    Hi @Alfalah, Mohammad,

    "The MOF compiler could not connect with the WMI server". This happens when Windows Management Instrumentation is not properly installed on the operating system.

    Solution: Use the following procedure:

    Open an elevated command prompt, and change the directory to the folder location from Step 1.

    For SQL Server 2022 and later versions, type the following command, and then press Enter:

    mofcomp "sqlmgmprovider.mof"

    For more information, check: https://learn.microsoft.com/en-us/troubleshoot/sql/tools/error-message-when-you-open-configuration-manager

    Invalid command line argument. Consult the windows installer SDK for detailed command line help.

    Here is a same thread you can try the method to see if it is helpful.

    If these all do not work, please try to do a clean uninstall 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

  2. Erland Sommarskog 116.9K Reputation points MVP
    2025-02-12T22:13:32.1666667+00:00

    First things first: what hardware do you have? If you have an ARM processor, beware that SQL Server does not support ARM. The rest of the answer assumes that you have a regular x64 processor.

    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 read the article Troubleshoot errors related to system disk sector size greater than 4 KB 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\160\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.

    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.