I want to install device driver in one click. In order to do that, I use
Installshield to create a custom action which run INF file through
rundll32. I have tried to add class key, hardware key, and service key in
INF into the registry. class key was added as expected but hardware and
service key was not allowed to do so. I will appreciate if anyone can help
on this.
Here is my INF file.
[Version]
Signature=$Windows NT$
Class=System
ClassGuid={4d36e97d-e325-11ce-bfc1-08002be10318}
[Manufacturer]
[DefaultInstall.NT]
CopyFiles=DriverCopyFiles
CopyFiles=InfCopyFiles
[DriverCopyFiles]
cmemw2kp3.sys,2
cmemw2kp3.pdb,2
[InfCopyFiles]
cmemw2k.inf,2
[DestinationDirs]
;DefaultDestDir=12
DriverCopyFiles=12
InfCopyFiles=17
[SourceDisksFiles]
cmemw2kp3.sys=1
cmemw2kp3.pdb=1
cmemw2k.inf=1
[SourceDisksNames]
1=%Disk_Desc%,disk1
[DefaultInstall.NT]
RequiredEngine=setupapi
DelReg=DelRegmy
AddReg=AddRegmy
[DelRegmy]
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”
;The hardkey cann’t be deleted
;HKLM,“System\CurrentControlSet\Enum\PCI\VEN_1166&DEV_0012&SUBSYS_00000000&REV_02\3&267a616a&0&00”
[AddRegmy]
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,“DriverDesc”,“0x00000000”,"
Controller"
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,“InfPath”,“0x00000000”,“cmemw2k.inf”
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,“InfSection”,“0x00000000”,“DefaultInstall”
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,“InfSectionExt”,“0x00000000”,“.NT”
HKLM,“System\CurrentControlSet\Control\Class{4d36e97d-e325-11ce-bfc1-08002be10318}\0015”,“MatchingDeviceId”,“0x00000000”,“pci\ven_1166&dev_0012&subsys_00000000&rev_01”
[DefaultInstall.NT.Services]
AddService=COMPMEM,2,DriverService
[DriverService]
ServiceType=1
StartType=3
ErrorControl=1
ServiceBinary=%12%\cmemw2kp3.sys
[Strings]
Disk_Desc=“Driver Disk”
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com