Error 87 when starting a service means Windows was given a bad parameter, usually a malformed service path, a mistyped sc command, or a corrupted parameter in the service registry key.
sc qc followed by the service name in an admin Command Prompt and read the BINARY_PATH_NAME line. A path with spaces that is not wrapped in quotes, or a path with a stray character, causes this error."C:\Program Files\Vendor\service.exe". If the quotes are missing or mismatched, reinstall the program to rewrite the path correctly.sc commands. The sc tool needs a space after every equals sign, like sc config with the service name and start= auto. Without the space, it reports error 87.sfc /scannow in an admin Command Prompt if the service is a Windows service, since a damaged system file can also surface as error 87.If the error only appears when a script starts the service, check the exact command the script runs. A missing quote or a wrong switch in the script is the usual cause, and the Services console can start the same service without trouble.
Why does sc config keep giving me error 87? Because sc needs a space after the equals sign, like start= auto. Writing start=auto with no space is the most common cause of error 87 from the command line.
What is a bad parameter for a service? Usually the binary path or a startup parameter. A path with unquoted spaces, a switch the program does not recognise, or a leftover registry value can all be the bad parameter Windows is complaining about.