I’m attempting to change the name of the driver I’m working on (it used to be ‘Tersus’, now it’s ‘FACT’). I’ve changed my ‘sources’ and I’m building the driver as FACT.sys instead of Tersus.sys, and I’ve managed to get the INF file updated to the point that it uses the new .sys file correctly.
So far, so good. When I reload the driver (see batch file below), everything goes just fine, the driver is unloaded, the new one loads, the driver works.
If I change the service name, however, (section [DriverInstall.NT.Services], the first parameter of the AddService line) it refuses to install anymore with the error “The name is already in use as either a service name or a service display name”.
I’ve poked around in the registry in the HKLM\System key, looking for references to Tersus or FACT, and removing all that I find, but nothing seems to help. I’ve tried changing the service name to other strings (‘Joseph’, ‘Bill’ were recent attempts) to no avail. It’s clear that Windows has got the old name fixed in it’s brain somewhere, but where?
I just tried searching the registry for my interface GUID, but that didn’t help either. (I didn’t really expect it to - the driver’s interface guid shouldn’t be involved in installation)
Obviously, I’ve missed something/done something wrong, but what the heck is it? Do I need to re-install windows to get it to let go of this old name? Is there something wrong with my INF file that I’m just not seeing? (I’m relatively new to windows drivers, so I wouldn’t be surprised).
System is XP Pro SP2, 32 bit, on a twin Opteron system with 4 gigs of ram. Tyan motherboard, but I assume that all has nothing to do with the problem.
Any help would be greatly appreciated.
Thanks!
Presently I’m using the following batch file to reload the driver:
@REM -------------------------------
devcon remove *1738*
del %windir%\system32\drivers\Tersus.sys
del %windir%\system32\drivers\FACT.sys
@REM find all the inf files for our device
grep -l MediaAnalyst %SystemRoot%\inf*.inf > c:\kill.txt
grep -l Tersus %SystemRoot%\inf*.inf >> c:\kill.txt
grep -l FACT.sys %SystemRoot%\inf*.inf >> c:\kill.txt
@REM delete the inf files
for /F “” %%A IN (c:\kill.txt) do del %%A
@REM force the system to look for a new driver
devcon rescan
@REM -----------------------------------
And here’s my inf file:
;Copyright 2006 by Videotek, Harris Broadcast Communications Division
;
; File Name: Tersus.inf
; Install information file for Tersus Driver
;
; Generated by C DriverWizard 3.2.0 (Build 2485)
; Requires DDK Only
; File created on 1/10/2006
;
;--------- Version Section ---------------------------------------------------
[Version]
Signature=“$WINDOWS NT$”
Class=Media
ClassGUID={4d36e96c-e325-11ce-bfc1-08002be10318}
Provider=%Provider%
DriverVer=01/10/2006,0.01.0000.0
CatalogFile=Tersus.cat
[ControlFlags]
; Pnp drivers should not be installable via non-PnP hardware dialogs
ExcludeFromSelect = *
;--------- DestinationDirs Section -------------------------------------------
; our driver files go in %windir$\system32\drivers (12 on windows XP)
; we default to 10 because we have to default to something (10 is %windir%)
; we also use 11 later (11 is %windir%\system32)
; (NOTE: these numbers are refered to as ‘Dirids’ in the DDK docs)
[DestinationDirs]
DefaultDestDir = 10
DriverFiles = 12
;--------- SourceDiskNames and SourceDiskFiles Section -----------------------
; These sections identify source disks and files for installation.
[SourceDisksNames.x86]
1 = %DiskId1%,\i386
[SourceDisksFiles]
FACT.sys = 1,
;--------- Manufacturer and Models Sections ----------------------------------
[Manufacturer]
; Videotek for XP on x86
%Provider%=DeviceList,NTx86
; OS < XP
[DeviceList]
;!!deliberately empty!!
;We do not support anything below windows XP at this time
; Our device ID information:
; Device ID A000 Vendor ID 1738 Rev 01 Subsystem ID A000 1738 Class 040000
;XP on x86
[DeviceList.NTx86]
; DisplayName Section DeviceId
%MA100Desc%=DriverInstall, PCI\VEN_1738&DEV_A000&SUBSYS_A0001738&REV_01
;---------- DDInstall Sections -----------------------------------------------
; --------- Windows NT -----------------
; .NT means XP. We install the same way no matter what the hardware
; architecture (x86 or amd64)
[DriverInstall.NT]
CopyFiles=DriverFiles
[DriverInstall.NT.Services]
Addservice = Tersus,%FLG_ADDREG_NOCLOBBER%,DriverService,EventLogging
; --------- Service ----------------------
[DriverService]
DisplayName = %ServiceDescription%
ServiceType = %SERVICE_KERNEL_DRIVER%
StartType = %SERVICE_DEMAND_START%
ErrorControl = %SERVICE_ERROR_NORMAL%
ServiceBinary = %12%\FACT.sys
LoadOrderGroup = Extended Base
; add registry entries so that event logger can translate
; our messages. We just use the standard ones.
[EventLogging]
AddReg=EventLogAddReg
[EventLogAddReg]
HKR,EventMessageFile,0x00020000,“%11%\iologmsg.dll”
HKR,TypesSupported,0x00010001,7
; --------- Files ----------------------
[DriverFiles]
FACT.sys,2
;--------- Strings Section ---------------------------------------------------
[Strings]
Provider = “Harris”
MA100Desc = “MA100 FACT Device”
ServiceDescription = “FACT Family Device Driver”
DiskId1 = “FACT Family Device Installation Disk #1”
REG_SZ = 0x00000000
REG_MULTI_SZ = 0x00010000
REG_EXPAND_SZ = 0x00020000
REG_BINARY = 0x00000001
REG_DWORD = 0x00010001
REG_NONE = 0x00020001
SERVICE_KERNEL_DRIVER = 0x00000001
SERVICE_FILE_SYSTEM_DRIVER = 0x00000002
SERVICE_ADAPTER = 0x00000004
SERVICE_RECOGNIZER_DRIVER = 0x00000008
SERVICE_BOOT_START = 0x0
SERVICE_SYSTEM_START = 0x1
SERVICE_AUTO_START = 0x2
SERVICE_DEMAND_START = 0x3
SERVICE_DISABLED = 0x4
SERVICE_ERROR_IGNORE = 0x00000000
SERVICE_ERROR_NORMAL = 0x00000001
SERVICE_ERROR_SEVERE = 0x00000002
SERVICE_ERROR_CRITICAL = 0x00000003
FLG_ADDREG_NOCLOBBER = 0x00000002
FLG_ADDREG_DELVAL = 0x00000004
FLG_ADDREG_APPEND = 0x00000008
FLG_ADDREG_KEYONLY = 0x00000010
FLG_ADDREG_OVERWRITEONLY = 0x00000020
FLG_ADDREG_64BITKEY = 0x00001000
FLG_ADDREG_KEYONLY_COMMON = 0x00002000
FLG_ADDREG_32BITKEY = 0x00004000
Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”