I am creating an install App for an NDIS driver (a PCI device) - for 98se.
I create a reg path of HKLM\Enum\PCI\VEN_ID&DEV_ID. After selecting the
driver & getting the DEVICE_INFO struct filled, I call
DiCallClassInstaller(DIF_INSTALLDEVICE).
This populates the reg path above with the info which usually goes
into HKLM\Enum\PCI\VEN_ID&DEV_ID&SUBSYS_ID&REV_#\BUS_#&DEV_#&FUNC_# -
causing the New hardware Wizard to be invoked after reboot.
How do I create the reg entries at the appropriate location?
Alternately is there a better method?
I am creating an install App for an NDIS driver (a PCI device) - for 98se.
I create a reg path of HKLM\Enum\PCI\VEN_ID&DEV_ID. After selecting the
driver & getting the DEVICE_INFO struct filled, I call
DiCallClassInstaller(DIF_INSTALLDEVICE).
This populates the reg path above with the info which usually goes
into HKLM\Enum\PCI\VEN_ID&DEV_ID&SUBSYS_ID&REV_#\BUS_#&DEV_#&FUNC_# -
causing the New hardware Wizard to be invoked after reboot.
How do I create the reg entries at the appropriate location?
Alternately is there a better method?
Thanks for your response Udo, however I do need to create a setup.exe to
install the driver - rather than having the user to go through the Add New
Hardware Wizard installation.
Thanks for your input Don. MS does provide mechanisms for ‘forcing
install’ of PnP devices on most of the OSs. The latest DDK does a
relatively better job at documenting these - but they are differen APIs.
There is no additional functionality to be provided here. All I want is
that the process of going through the Hardware wizard, pointing to the inf
location etc be automated so that the driver is installed by executing the
app.
I understand that the co-installer is used to provide additional custom
functionality - which is not reqd here. Morever this would imply user
still having to use the New Hardware wiz, locating the inf …
The user needs to know nearly nothing. If he plugs in your hardware and starts the system, the Hardware Wizard shows up. If you have your INF on your CDROM (just like the setup.exe) then the user has simply to click Next/Next/Next/Finish. This should be simple.
If you want to go without the CDROM you can have setup.exe copy the INF to the system’s INF dir and copy the .sys to the drivers dir. Remove the CopyFiles instruction from the INF in that case.
BUT, this is not compliant with MS guidelines for PnP device installation! However, it works. Consider using SetupCopyOEMInf to copy the INF. This will avoid naming conflicts.
For a non-interactive device installation you could also use the UpdateDriverForPlugAndPlayDevices API. However, it is not available on Win98.
Thanks for your input Don. MS does provide mechanisms for ‘forcing
install’ of PnP devices on most of the OSs. The latest DDK does a
relatively better job at documenting these - but they are differen APIs.
There is no additional functionality to be provided here. All I want is
that the process of going through the Hardware wizard, pointing to the inf
location etc be automated so that the driver is installed by executing the
app.
I understand that the co-installer is used to provide additional custom
functionality - which is not reqd here. Morever this would imply user
still having to use the New Hardware wiz, locating the inf …
Udo, THere apparently are people who would prefer not interacting with the
New Hardware wizard. The reasoning for such an app is out of discussion -
I didn’t ask for it! Morever there have been such solutions in the market.
The copy .sys & .inf into respective directories approach only takes out
the CDROM out of the picture - but not the Add New Hardware wizard. Call
it wizard-o-phobia! Part of the complication is that windows chooses a
non-uniform method of identifying an instance - instead of using the
bus_xx&dev_xx&fun_xx identifiers all the time, it uses some 6 or 8 digit
numbers which apparently contain same information. How this is encoded &
what is used where - is what I need to know.