Hi.
First of all, I’m sorry if I write wrong forum and for silly question.
I would like to know how to to install the driver(s) automatically.
I search a lot of time every, but I can’t find the way.
I tried for example
rundll32.exe advpack,LaunchINFSection filepath, sectionname
and
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 filepath
But I get no results.
Could anyone can tell me please, how can I install the driver from my Win32 app.
I mean what function or routines I need to use to do this?
Depends on the type of your driver(s).
Are these drivers for some real hardware devices, or “kernel mode services”
not related to real hardware.
The former type (PnP drivers) can not be installed by the ways you’ve
mentioned,
because they are not regular services.
And some kinds of drivers may have yet other special requirements.
Have a look at these articles:
http://www.microsoft.com/whdc/driver/install/app_drv.mspx
http://www.microsoft.com/whdc/driver/install/difxtools.mspx
Regards,
–PA
wrote in message news:xxxxx@ntdev…
> Hi.
> First of all, I’m sorry if I write wrong forum and for silly question.
> I would like to know how to to install the driver(s) automatically.
> I search a lot of time every, but I can’t find the way.
> I tried for example
> rundll32.exe advpack,LaunchINFSection filepath, sectionname
> and
> RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 filepath
> But I get no results.
> Could anyone can tell me please, how can I install the driver from my
> Win32 app.
> I mean what function or routines I need to use to do this?
>
Thank you for answer.
I would like to know about drivers which are situated in
My Computer->Properties->Hardware->Device manager.
For example this sample driver http://rapidshare.com/files/121968233/sample_driver.rar.html
I want to write Win32 app which will be installing this type of drivers automatically.
I read these articles, but I still can’t understand how to do this.
wrote in message news:xxxxx@ntdev…
> Thank you for answer.
> I would like to know about drivers which are situated in
> My Computer->Properties->Hardware->Device manager.
> For example this sample driver
> http://rapidshare.com/files/121968233/sample_driver.rar.html
> I want to write Win32 app which will be installing this type of drivers
> automatically.
> I read these articles, but I still can’t understand how to do this.
Ok this driver is for so called “root enumerated” device.
It does not handle a real hardware, but it is still a PnP type driver.
It can not be installed by rundll32.
Try to install it with this tool:
http://support.microsoft.com/kb/311272/en-us
Regards,
–PA
I can install it with Control Panel->Add hardware,
But I would like to write my own code which will be installing this type of drivers automatically and don’t know what functions I need to use from win32 userside app.
It’s possible because I saw some installers are installing drivers automatically. (In case If driver doesn’t has certificate, user must press “Continue” button)
I tiried to compile src\setup\devcon from DDK and tried to install using
devcon.exe install Example.inf 0
And I got
“Device node created. Install is complete when drivers are updated…
Updating drivers for 0 from C:\WINDDK\3790\src\setup\devcon\objchk_wnet_x86\i386
\Example.inf.
devcon.exe failed.”
Could any can say, what HardwareID I need to use?
(My driver doesn’t need to be attached to hardware)
xxxxx@gmail.com wrote:
I tiried to compile src\setup\devcon from DDK and tried to install using
devcon.exe install Example.inf 0
And I got
“Device node created. Install is complete when drivers are updated…
Updating drivers for 0 from C:\WINDDK\3790\src\setup\devcon\objchk_wnet_x86\i386
\Example.inf.
devcon.exe failed.”
Could any can say, what HardwareID I need to use?
(My driver doesn’t need to be attached to hardware)
Only you can answer this question. Is this a real PnP driver (with an
AddDevice routine), or is it a legacy driver? If it is legacy, then you
don’t use an INF file, nor do you use devcon.exe to install it. If it
is a PnP driver, then your INF file has the hardware ID that you chose,
and that’s what you need to use.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Couldn’t someone use a root enumerated PnP driver? True, it is mostly
legacy but will play much better with power and PnP management.
“Tim Roberts” wrote in message news:xxxxx@ntdev…
> xxxxx@gmail.com wrote:
>> I tiried to compile src\setup\devcon from DDK and tried to install using
>> devcon.exe install Example.inf 0
>> And I got “Device node created. Install is complete when drivers are
>> updated…
>> Updating drivers for 0 from
>> C:\WINDDK\3790\src\setup\devcon\objchk_wnet_x86\i386
>> \Example.inf.
>> devcon.exe failed.”
>> Could any can say, what HardwareID I need to use?
>> (My driver doesn’t need to be attached to hardware)
>
> Only you can answer this question. Is this a real PnP driver (with an
> AddDevice routine), or is it a legacy driver? If it is legacy, then you
> don’t use an INF file, nor do you use devcon.exe to install it. If it is
> a PnP driver, then your INF file has the hardware ID that you chose, and
> that’s what you need to use.
>
> –
> Tim Roberts, xxxxx@probo.com
> Providenza & Boekelheide, Inc.
>
>
David Craig wrote:
Couldn’t someone use a root enumerated PnP driver? True, it is mostly
legacy but will play much better with power and PnP management.
It’s not legacy at all. It is a full PnP driver, and has to be
installed like other PnP drivers.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Ok. Thank you all.
I solved this problem using functions from Setupapi.dll.