SetupCopyOEMInf(
szSourceInfFileName,
NULL,
SPOST_PATH,
SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE,
szDestInfFileName,
MAX_PATH,
NULL,
NULL
);
Thanks,
Shawn
OriginalInfSourcePath = %1%
Take a look at the GetMediaRootDirectory routine in the
toaster\toastpkg\toastco\toastco.c file and also the toastpkg.inf INF file
which specifies this symbol. If I remember it right, the MUX IM sample of XP
DDK also uses this technique to workaround CopyINF directive issue on Win2K.
--
-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.
"shawn" <sh...@att.com> wrote in message
news:eRbTsC#uCHA.2372@TK2MSFTNGP12...
If I set the CopyStyle = to SP_COPY_REPLACEONLY | SP_COPY_NOOVERWRITE, will
that always update the corresponding PNF with the new source path location?
Thanks,
Shawn
"Eliyas Yakub [MSFT]" <eli...@online.microsoft.com> wrote in message
news:uLltCC$uCHA.848@TK2MSFTNGP11...
If you include the path to your new installation folder in the second
parameter of the SetupCopyOEMInf call, then the PNF should be created with
that location. It sounds like PnP may be choosing your old driver for the
device, rather than the new driver. Is the new driver signed? You might
want to turn on verbose SetupAPI logging and see if PnP is selecting the
wrong driver, and why.
Thanks,
Jeff McCashland [MS]
"Jeff McCashland [MS]" <je...@online.microsoft.com> wrote in message
news:oK7QeslvCHA.1844@cpmsftngxa09...
The SetupCopyOEMInf call is used to pre-install drivers for non-present
devices. If you are updating a driver for a present device, you can use
UpdateDriverForPlugAndPlayDevices on Windows 2000 and XP. If the device
was previously installed with your old driver, but is currently not
present, then look at the UpdateDriverThreadProc function in the
toastpkg\toastva.c (suggested by eliyasy). This routine shows how to
update drivers for non-present devices.