Force Microsoft Windows Service Settings

There are services within Microsoft Windows operating system that one cannot easily configure as in StartupType=Disabled. This post will show how to ensure a service is disabled regardless of errors encountered when using traditional means (e.g. gui (MMC), commandline (cmd), PowerShell) and without delving into ACLs.

This issue was identified while implementing Microsoft Desired State Configuration (DSC) on Windows Server 2019.

All of the following was launched from an elevated command prompt as Administrator.

Microsoft Management Console (MMC)

grayed out service properties.
grayed out service properties.

Command Line (cmd.exe)

sc config command results in access is denied.
sc config command results in access is denied.

PowerShell

powershell set-service error
powershell set-service error

Registry

Computer\HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services

In regedit it should look like the following. Scroll down the list to find the service you’re interested in modifying. Then set theStart REG_DWORD to 4 if you want to disable the service.

If PowerShell is preferred, the following command will disable a service by setting Start=4 in the registry configuration. Be sure to launch from an elevated command prompt.

Set-ItemProperty -Path HKLM:\SYSTEM\ControlSet001\Services\ClipSVC -Name Start -Value 4

The downside to modifying registry entries is it most often requires a reboot to take effect. There are exceptions though plan to reboot the system after making configuration changes such as this.

Desired State Configuration (DSC)

clipsvc dsc registry config
clipsvc dsc registry config