[PATCH] programs/sc: Allow using separate arguments for parameter name and value.

Torge Matthies tmatthies at codeweavers.com
Tue Apr 26 07:48:04 CDT 2022


On 4/25/22 20:52, Dmitry Timoshkov wrote:
> Torge Matthies <tmatthies at codeweavers.com> wrote:
> 
>> On 4/25/22 20:17, Dmitry Timoshkov wrote:
>>> Torge Matthies <tmatthies at codeweavers.com> wrote:
>>>
>>>> In addition to using one argument for both parameter name and value.
>>>>
>>>> This fixes a regression from commit 8b38c91d83844dea882922055ced7cdeb79c1693.
>>>
>>> Could you please clarify what precisely is the regression caused by the
>>> mentioned above commit, and provide some examples which command lines
>>> were broken and started to work with your patch.
>>>
>>
>> The mentioned commit broke commands like:
>>
>>       sc.exe create test binpath= C:\windows\system32\cmd.exe
>>
>> and:
>>
>>       sc.exe create test binpath= C:\windows\system32\cmd.exe
>> displayname= "Test Service" start= auto
>>
>> All sc create or sc failure commands where the parameter names and
>> values are separated by a space are affected.
> 
> Thanks, it looks like sc.exe from Windows 10 does support providing
> an argument as a separate parameter, and it's even reflected in the help
> message (parameter name includes equal sign (=)) when 'binpath = path' is
> passed on the command line.
> 
> Just curious, is your patch supposed to fix some real use case?

It's supposed to fix service creation with sc.exe in general. The syntax
with the spaces has been the default forever and I didn't even know that
the other syntax was accepted.

I have a script that installs an exe as a service and that got broken.
But I'm sure there are many more things that depend on sc.exe accepting
the syntax with spaces between parameter name and value.



More information about the wine-devel mailing list