Driver Installation

Hi All,
I have one INF and .SYS file for my USB adapter. My
setup program copies this INF file to /INF and
.SYS to /Drivers directory. Now when user plug
in the USB adapter, the found new hardware comes up.
It will take my INF file and while installing the
device, it will ask for the .SYS file, which is
already there in the Drivers directory.
How I can disable this thing?. Which value I have to
add in the INF , so that it will first seacrch the
driver in Drivers directory.

Is there any sample code for installing the driver
from install shield? or do I need to use the Setupdi
calls for driver installation.

Thanks in adavnce
Suja.

__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for ‘Shrek 2’
http://movies.yahoo.com/showtimes/movie?mid=1808405861

“SUJA JAMES” wrote in message news:xxxxx@ntdev…
> Hi All,
> I have one INF and .SYS file for my USB adapter. My
> setup program copies this INF file to /INF and
> .SYS to /Drivers directory. Now when user plug
> in the USB adapter, the found new hardware comes up.
> It will take my INF file and while installing the
> device, it will ask for the .SYS file, which is
> already there in the Drivers directory.
> How I can disable this thing?. Which value I have to
> add in the INF , so that it will first seacrch the
> driver in Drivers directory.
>
> Is there any sample code for installing the driver
> from install shield? or do I need to use the Setupdi
> calls for driver installation.
>
> Thanks in adavnce
> Suja.

You should use
SetupCopyOEMInf( path_to_ini_file, NULL, SPOST_PATH, … );

This will register the INF file and the location of the driver binaries with
Windows, so the Pnp manager will know from where to pull the driver. You should
not copy INF files to the inf directory or driver files to the drivers
directory yourself!
If the hardware may already have been installed, you should also call
UpdateDriverForPlugAndPlayDevices() - there are good examples in the DDK.

What our installation does is to copy the drivers and INF files to a directory
on the HDD (e.g. c:\program files\ourcompany\ourdrivers), and then use
SetupCopyOEMInf() and UpdateDriverForPlugAndPlayDevices(). It works perfectly
for hardware first and software first installations.

regards,
Tzvetan