With the release of Windows 11 22H2 moving to Terminal as the default, I am seeing changes to the way CMD is now processing the commands. I have two computers one on Windows 11 21H2 and one on Windows 11 23H2. The older version will process the command, as it has for many years, but now in Terminal there has been a change, and it only offers help options for the command as if it doesn't get the parameter is it being passed.
I have attempted to setup and run CMD as the default, and also tried legacy mode, both of which did nothing.
I am looking for the details behind what changed, and how these are being parsed as this could have larger impacts.
The command is :
SC CONFIG ThisProgram binPath= """"C:\Program Files (x86)\ThisProgram\ThisProgram.exe""""
Now on the older version we are getting a response of :
[SC] OpenService FAILED 1060: The specified service does not exist as an installed service.
Which is expected. However now that we are on the newer version of Windows we are getting a help message as if the parameter is not even there:
DESCRIPTION:
Modifies a service entry in the registry and Service Database.
USAGE:
sc <server> config [service name] <option1> <option2>...
OPTIONS:
NOTE: The option name includes the equal sign.
A space is required between the equal sign and the value.
To remove the dependency, use a single / as dependency value.
type= <own|share|interact|kernel|filesys|rec|adapt|userown|usershare>
start= <boot|system|auto|demand|disabled|delayed-auto>
error= <normal|severe|critical|ignore>
binPath= <BinaryPathName to the .exe file>
group= <LoadOrderGroup>
tag= <yes|no>
depend= <Dependencies(separated by / (forward slash))>
obj= <AccountName|ObjectName>
DisplayName= <display name>
password= <password>