I need to be able to stop and start the Dhcp Client service

ccastelan 1 Reputation point
2021-05-12T23:49:24.243+00:00

For something I am working on, I need to be able to stop and start the Dhcp Client service. However, when I attempt to do so through elevated command prompt I am greeted with System error 5 has occurred and Access is denied. I believe the error is caused when Windows tries to stop the WinHttpAutoProxySvc since that is one of its dependencies, I am trying this on a windows server 2019 with an administrator account.

What can i do to fix it?

If I go directly to services, the control options for WinHttpAutoProxySvc appear disabled.

96115-image.png

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,468 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2021-05-13T00:16:30.19+00:00

    You'll need to edit the registry, navigate to
    HKLM\System\CurrentControlSet\Services\WinHttpAutoProxySvc
    then set the "Start" DWORD to Value = 4 (Disabled) and reboot.

    --please don't forget to Accept as answer if the reply is helpful--

    1 person found this answer helpful.

  2. Sunny Qi 10,901 Reputation points Microsoft Vendor
    2021-05-13T08:43:41.237+00:00

    Hi,

    Thanks for posting in Q&A platform.

    Please try make the permission changes in the registry by following the detailed steps to see if the issue can be resolved.

    A.

    1. Click Start, click Run, type regedit and click OK
    2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dhcp
    3. Right click the key DHCP and click Permissions. Click Add, type network service and click OK

    Select NETWORKSERVICE and check the Full control box to grant NETWORKSERVICE full control on the DHCP key.

    Click OK to apply the changes and to close the window

    B.

    Also perform the same action on the following key:

    1. Click Start, click Run, type regedit and click OK
    2. Navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp
    3. Right click the key TcpIp and click Permissions. Click Add, type network service and click OK
    4. Select NETWORKSERVICE and check the Full control box to grant NETWORKSERVICE full control on the TcpIp key.
    5. Click OK to apply the changes and to close the window

    And I checked the service WinHttpAutoProxySvc of DHCP client in my environment, the default status is Mamual, attaching the screenshot for your reference:

    96236-image.png

    Best Regards,
    Sunny

    ----------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  3. Dave Patrick 426.1K Reputation points MVP
    2021-05-24T13:03:44.53+00:00

    Just checking if there's any progress or updates?

    --please don't forget to Accept as answer if the reply is helpful--

    0 comments No comments