INF DelService Directive

Note If you are building a universal or mobile driver package, this directive is not valid. See Using a Universal INF File.

A DelService directive is used in a DDInstall.Services section to remove one or more previously installed device/driver services from the target computer.




Specifies the name of the service to be removed.

For a device, this value is usually a generic name for its driver, such as "sermouse," or some such name.

This optional value is specifies one or more of the following flags, defined in Setupapi.h, that are specified as a hexadecimal value:

An event-log entry (or entries) associated with the given ServiceName should also be removed from the system.

Stop the service before deleting it.

Optionally specifies one of System, Security, or Application. This can be omitted if the event log to be removed is of type System.

Optionally specifies the name for the event log. This can be omitted if it is identical to the specified ServiceName entry.


This directive is rarely used. The only services that can be safely deleted are those that were used only in earlier versions of the operating system, and are therefore never used for the currently installed version.

Starting with Windows XP, you can use the TargetOSVersion decoration to control version-specific installation behavior. For more information about this decoration, see INF Manufacturer Section.

However, by default, event-log information supplied by a particular device driver is not removed from the system on deinstallation, unless the INF for the device/driver explicitly requests the removal (flags or EventName) of the event log along with the removal of the driver services.

See also