views:

97

answers:

0

Hi,

I am trying to install a device driver through INF file. But when i am reinstalling the device driver through the INF file created by me I am getting the following error in the log file C:\Windows\inf\setupapi.dev.log.

Add Service: Failed to create service 'MyService'. !!! dvi: Error 1078: The name is already in use as either a service name or a service display name.

I can understand that I am getting this error because when ever the driver is getting installed again the service specific to this driver is getting created again, as this service is already present the above error is thrown.

Is there any way to replace or overwrite the service and service display name when ever the services specific to this driver gets created.

Here is the entry for my service in my inf file [MyDriver.INSTALL.NT.Services] AddService = MyService,0x00000002,MyService_Inst

Here 0x00000002 tells to create a service for the function driver, I did not find any flag to OR with to replace the service name and service display name.

[MyService_Inst] ServiceType = 1 StartType = 3 ; Start type is irrelevant on WDM ErrorControl = 1 ServiceBinary = %12%\MyDriver.sys DisplayName = MyDriverService

If not possible can you please tell me a way to remove all the references to my earlier installed driver in Vista.

related questions