INF follies (I'm doing something wrong)

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.”

You need to reboot. You are changing values in the registry, but the
SCM has them cached. Either you use the SCM APIs to change the name or
uninstall the old driver to avoid the reboot or let the SCM reload its
data on a reboot.
d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 7:33 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] INF follies (I’m doing something wrong)

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.”


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System
reboot
verify registry has no trace of my driver
shutdown, reinstall my device
reboot
install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot. You are changing values in the registry, but the
> SCM has them cached. Either you use the SCM APIs to change the name or
> uninstall the old driver to avoid the reboot or let the SCM reload its
> data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
>

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I think if had a DelService directive in the INF, no reboots would have been necessary.

d

– I can spell, I just can’t type.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 9:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

There is.

Use System Restore to set a check point before installing a driver. The
system itself will set one, but setting your own won’t hurt. Run System
Restore against that checkpoint, or against one you know predates your
driver install, will effectively wipe/remove the driver.

You can also create an image of the disc and simply re-image the disc.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 11:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct
sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot
verify registry has no trace of my driver shutdown, reinstall my device
reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Think of it like this. The SCM “owns” the keys immediately under HKLM\System\CurrentControlSet\Services. If you create, modify, or delete keys that represent services, or if you modify the values directly under those keys that the SCM itself uses, then you’re going behind the back of the SCM, and are asking for trouble.

Windows has shipped with a simple command-line tool that provides raw access to the SCM APIs – SC.EXE. Rather than directly modifying values under the Services key, use SC.EXE to do the equivalent. This way, you allow the SCM to keep its in-process state synchronized with the registry store.

Note that this doesn’t apply to keys under the service keys that are *not* managed by the SCM, such as HKLM\System\CurrentControlSet<service>\Parameters. But you should still only create / delete a “Parameters” key or similar once the service key itself has been created by the SCM. This isn’t as important any more, since WDM provides a standard way to store per-device configuration. Still, “Parameters” keys are still quite popular for user-mode services.

The same applies to SetupDi*. If you manually munge the registry (device keys, driver keys, etc.), you are only modifying a passive configuration store – you are not giving the kernel or any user-mode components any opportunity to act on a semantic change (such as removing a device node or driver).

Also, the easiest way to reload a device driver is to disable all devnodes that depend on it, then re-enable one or more of them. This obviously doesn’t apply in all situations, but works quite well for most common drivers.

– arlie

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 9:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

> -------Original Message-------
> From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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!
>

Next time use:

Sc delete

Instead of deleting the service entry in the registry. No reboot required (assuming the service isn’t in use).

-p

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 9:03 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

> -------Original Message-------
> From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

No, I mean cleaning up the whole thing. Removing INFs and PNFs, removing stale device nodes and service entries, and removing the *.sys files. DPInst does a lot of this but leaves the service entries and stale device nodes there.

And in vista it gets even worse. It’s almost impossible to do a manual cleanup of a situation like this in vista.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Arlie Davis
Sent: Thursday, May 18, 2006 12:57 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Think of it like this. The SCM “owns” the keys immediately under HKLM\System\CurrentControlSet\Services. If you create, modify, or delete keys that represent services, or if you modify the values directly under those keys that the SCM itself uses, then you’re going behind the back of the SCM, and are asking for trouble.

Windows has shipped with a simple command-line tool that provides raw access to the SCM APIs – SC.EXE. Rather than directly modifying values under the Services key, use SC.EXE to do the equivalent. This way, you allow the SCM to keep its in-process state synchronized with the registry store.

Note that this doesn’t apply to keys under the service keys that are *not* managed by the SCM, such as HKLM\System\CurrentControlSet<service>\Parameters. But you should still only create / delete a “Parameters” key or similar once the service key itself has been created by the SCM. This isn’t as important any more, since WDM provides a standard way to store per-device configuration. Still, “Parameters” keys are still quite popular for user-mode services.

The same applies to SetupDi*. If you manually munge the registry (device keys, driver keys, etc.), you are only modifying a passive configuration store – you are not giving the kernel or any user-mode components any opportunity to act on a semantic change (such as removing a device node or driver).

Also, the easiest way to reload a device driver is to disable all devnodes that depend on it, then re-enable one or more of them. This obviously doesn’t apply in all situations, but works quite well for most common drivers.

– arlie

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 9:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

> -------Original Message-------
> From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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!
>


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

That will work until your system restore point gets deleted to make room for another one. If you’re replacing an old driver with a new one, it may have been several known good reboots and several restore points made for other device installs since you made your restore point. Restore points are great if you can determine pretty early that you want to undo what you did. If there’s a longer period of time, they might not be much help.

It would be nice if you could mark a restore point to be saved until you decide to delete it. Restore points that are manually created should have that option. Automatic restore points should probably still be handled the way they are now.

And I don’t thinking imaging a disk and restoring it to be that much simpler.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@seagate.com
Sent: Thursday, May 18, 2006 12:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

There is.

Use System Restore to set a check point before installing a driver. The system itself will set one, but setting your own won’t hurt. Run System Restore against that checkpoint, or against one you know predates your driver install, will effectively wipe/remove the driver.

You can also create an image of the disc and simply re-image the disc.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 11:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify registry has no trace of my driver shutdown, reinstall my device reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

The ONLY way to know you have a clean system is to have an image or do a
reinstall of the OS. Using Ghost it is very easy if you have a second hard
drive in the system where the images can be kept. The primary drive is the
one used to do testing. This makes it easy to use Vista which loves to make
it hard for you to install XP or Server after it has gotten on the system.
You can keep drivers and other stuff on the 2nd HD to help you install a new
OS version or maybe a specific SP that you didn’t have a Ghost image already
created.

“Brown, Beverly” wrote in message news:xxxxx@ntdev…
That will work until your system restore point gets deleted to make room for
another one. If you’re replacing an old driver with a new one, it may have
been several known good reboots and several restore points made for other
device installs since you made your restore point. Restore points are great
if you can determine pretty early that you want to undo what you did. If
there’s a longer period of time, they might not be much help.

It would be nice if you could mark a restore point to be saved until you
decide to delete it. Restore points that are manually created should have
that option. Automatic restore points should probably still be handled the
way they are now.

And I don’t thinking imaging a disk and restoring it to be that much
simpler.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Thursday, May 18, 2006 12:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

There is.

Use System Restore to set a check point before installing a driver. The
system itself will set one, but setting your own won’t hurt. Run System
Restore against that checkpoint, or against one you know predates your
driver install, will effectively wipe/remove the driver.

You can also create an image of the disc and simply re-image the disc.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 11:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct sequence.
What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot verify
registry has no trace of my driver shutdown, reinstall my device reboot
install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

> -------Original Message-------
> From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot. You are changing values in the registry, but the
> SCM has them cached. Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

The problem with SR is true.

I’ve used GHOST in the past to image a disc, but the best I have found so
far is StorageCraft’s ShadowProtect. It uses the XP PE environment in a
recovery situation to restore multi-gigabyte images to bootable images.
The desktop version does a running incremental update.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 3:07 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

That will work until your system restore point gets deleted to make room
for another one. If you’re replacing an old driver with a new one, it may
have been several known good reboots and several restore points made for
other device installs since you made your restore point. Restore points
are great if you can determine pretty early that you want to undo what you
did. If there’s a longer period of time, they might not be much help.

It would be nice if you could mark a restore point to be saved until you
decide to delete it. Restore points that are manually created should have
that option. Automatic restore points should probably still be handled the
way they are now.

And I don’t thinking imaging a disk and restoring it to be that much
simpler.

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@seagate.com
Sent: Thursday, May 18, 2006 12:36 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

There is.

Use System Restore to set a check point before installing a driver. The
system itself will set one, but setting your own won’t hurt. Run System
Restore against that checkpoint, or against one you know predates your
driver install, will effectively wipe/remove the driver.

You can also create an image of the disc and simply re-image the disc.

Gary G. Little

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Thursday, May 18, 2006 11:11 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

Am I the only one who thinks there should be an easier way to do this?

Beverly

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
Sent: Thursday, May 18, 2006 12:03 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] INF follies (I’m doing something wrong)

I had tried some reboots, but apparently I didn’t try the correct
sequence. What I finally had to do was:

Uninstall my driver, delete the inf and sys from \windows.…
Shutdown, remove my PCI device.
Reboot
use regedit to remove all traces of my driver from HKLM\System reboot
verify registry has no trace of my driver shutdown, reinstall my device
reboot install new driver

Thank you very much for your help!

Michael Kohne
xxxxx@kohne.org
“You must be smarter than the equipment you are trying to operate.”

-------Original Message-------
From: Doron Holan
> Subject: RE: [ntdev] INF follies (I’m doing something wrong)
> Sent: May 18 '06 10:07
>
> You need to reboot.??You are changing values in the registry, but the
> SCM has them cached.??Either you use the SCM APIs to change the name
> or uninstall the old driver to avoid the reboot or let the SCM reload
> its data on a reboot.
> d
>
> – I can spell, I just can’t type.
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Michael Kohne
> Sent: Thursday, May 18, 2006 7:33 AM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] INF follies (I’m doing something wrong)
>
> 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.”
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

>The same applies to SetupDi*. If you manually munge the registry (device
keys,

driver keys, etc.), you are only modifying a passive configuration store –
you are

At least in 2003 R2, the SC automatically picks up the manual registry edits -
at least the change from Start = 2 to Start = 4 :slight_smile:

I would not rely on this though.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

>And I don’t thinking imaging a disk and restoring it to be that much simpler.

To a second drive, having a second OS installation? Trivial.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

Hi Michael,

Try the following change (make service section name same as service name)

[DriverInstall.NT.Services]
Addservice = Tersus,%FLG_ADDREG_NOCLOBBER%,Tersus,EventLogging

; --------- Service ----------------------

[Tersus]
DisplayName = %ServiceDescription%

… etc

Regards,
–PA

“Michael Kohne” wrote in message news:xxxxx@ntdev…
> 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.”
>