How to set «Start parameters» for a Windows service via a command line (`sc config`)?

2023-06-03--03-09-59

sc.exe config MySQL binpath="C:\server\mysql\bin\mysqld --defaults-file=\"C:\server\mysql\ini\my2.ini\""

The sc config command in Windows

Hello,

This does not work as binPath must be written with a capital P.
Also, for me, " does not work either.
I am curious to know on which Windows did it work?

@BigSmooth

This does not work as binPath must be written with a capital P.

It is just the Dunning–Kruger effect

2024-01-06--22-12-46

learn.microsoft.com/en-us/windows-server/administration/windows-commands/sc-config

Thank you for underlining the documentation.
I do not have access to the server over the week-end to check.

Dunning–Kruger effect number 2:
2024-01-08 08_29_01-152.67.78.38 - Remote Desktop Connection

@BigSmooth

I have checked: any letter case for binpath is accepted by sc.exe, despite many third-party documentation sources like ss64.com are lying that sc.exe options are case sensitive:
2024-01-08--10-52-29

1. binpath

2024-01-08--10-47-21

2024-01-08--10-46-25

2. binPath

2024-01-08--10-47-38

2024-01-08--10-47-59

3. BiNPaTh

2024-01-08--10-49-21

2024-01-08--10-49-46

If I don't put a capital P, it does not work on my side, that's why I wanted to know which OS are you on?

@BigSmooth

Windows 10 Pro, version 22H2, build 19045.3803
2024-01-08--11-00-38

ok. thanks.
I am on Windows Server 2019 (Version 1809 - build 17763.4737))