From: JY on
Hi,

I have a requirement to install a device driver using DPInst / DIfx from an
MFC based application. I've looked through the MSDN documentation on these
but haven't got a clear idea of what exactly are the steps involved in doing
this.

If I use ShellExecute(Ex) to invoke DPInst from my application, what ore the
other things that I need to do? Of course I would need the path to the driver
file, can I specify this using a compiler switch? What other things are
needed?

TIA,
JY
From: Maxim S. Shatskih on
> I have a requirement to install a driver from a MFC based application using
> DPInst / DIFx

You can also call APIs like SetupCopyOEMInf or UpdateDriverForPlugAndPlayDevices instead of invoking DPInst.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Tim Roberts on
JY <sd(a)nospamgroup.com> wrote:
>
>I'm posting this for the 3rd time. Somhow my posts are not showing up for
>whatever reason - please excuse.
>
>I have a requirement to install a device driver from my MFC application and
>have looked through some MSDN documention on usage of DPInst and DIFx
>framework, but I haven't got a clear idea yet.

For DPInst, all you need to do is create an XML configuration file, have
DPInst.exe in the same directory as the INF file and the XML file, and run
DPInst. It's pretty darned easy.

>1. A basic question is if I have a driver file that I need to install what
>exactly are the steps to be followed?

Take DPInst.exe, your DPInst.xml, your .inf, and your .sys. Have your
installer copy that to a Program Files location, then launch DPInst. That's
it. That will pre-install the driver.

>2. Can I use ShellExecute(Ex) to launch DPInst? What other things are needed?

Yes, indeed. I call it from an NSIS install script.
--
Tim Roberts, timr(a)probo.com
Providenza & Boekelheide, Inc.