Recently, I was trying to uninstall SQL Server via command prompt and faced an interesting situation. In this blog, we would learn about the error “The syntax of argument “/ACTION” is incorrect” and how to fix it.
THE SITUATION
As I mentioned in one of my recent blogs, due to a reboot of the server in the middle of the installation, I was supposed to clean up. UI didn’t work, and I decided to use the command line.
As soon as I provided a command to uninstall SQL Server, it gave below error.
The text of the message is as below.
SQL Server Setup has encountered the following error:
The syntax of argument “/ACTION” is incorrect. Either the delimiter ‘=’ is missing or there is one or more space characters before the delimiter ‘=’. Please use /? to check usage.
Error code 0x84B40001.
One we hit OK, we get below on command prompt.
The text is as follows.
C:\>”C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\SQL2017\setup.exe” /ACTION = UNINSTALL
The following error occurred:
The syntax of argument “/ACTION” is incorrect. Either the delimiter ‘=’ is missing or there is one or more space characters before the delimiter ‘=’. Please use /? to check usage.
Error result: -2068578303
Result facility code: 1204
Result error code: 1
Please review the summary.txt log for further details
Even though message says refer Summary.txt, there was no such file create on the location where generally setup logs are located. Then I referred documentation and found that there must be some file in the TEMP folder. I was able to find a file in my profile temp folder. You can go to Start > Run > and Type %TEMP% and look for a file called “SqlSetup_Local.log” exact same modified time when setup was invoked.
Here is the content of the file. I have removed time stamp for clarity.
Setup launched
Attempting to determine media source
Media source value not specified on command line argument and this setup is not running from media directly.
Assume no media info is needed. Exit
Setup.exe is running locally no check for a slip stream media
/? or /HELP or /ACTION=HELP specified: false
Help display: false
.Net version 4.0 is installed
Name verification using runtime version v4.0.30319
Strong name verification disabling is not required
/? or /HELP or /ACTION=HELP specified: false
Help display: false
Attempting to launch landing page workflow
Attempting to set setup mutex
Setup mutex has been set
Attempting to launch user requested workflow from media
Attempting to get execution timestamp
Timestamp: 20181126_055331
Attempting to run user requested action from media ScenarioEngine.exe
Attempting to launch process C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\SQL2017\x64\ScenarioEngine.exe
Process returned exit code: 0x84B40001
Media ScenarioEngine.exe returned exit code: 0x84B40001
Attempting to release setup mutex
Setup mutex has been released
Setup closed with exit code: 0x84C40013
This also doesn’t help much.
SOLUTION/WORKAROUND
I read error message again and it was #FacePalm situation. I will put a message here again and you might feel the same.
The syntax of argument “/ACTION” is incorrect. Either the delimiter ‘=’ is missing or there are one or more space characters before the delimiter ‘=’. Please use /? to check usage.
The message clearly says that don’t use space characters. My command was
“C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\SQL2017\setup.exe” /ACTION = UNINSTALL
If I do setup.exe /? I see below the line.
Usage:
setup.exe /[option]={value} /[option]={value} …
So, the right command would be
“C:\Program Files\Microsoft SQL Server\140\Setup Bootstrap\SQL2017\setup.exe” /ACTION=UNINSTALL
Note that I have removed space. Have you faced such a situation where adding extra space causes a problem?
Reference: Pinal Dave (https://blog.sqlauthority.com)
First appeared on SQL SERVER – SETUP Error: The Syntax of Argument “/ACTION” is Incorrect