Thanks
Thomas
PS: OS is XP / 2K
Good Luck,
Brent
>.
>
>On installing my driver, MyDevice.INF ist copied to OEMxx.INF and I copy
>MyDevice.INF.
You're not supposed to copy your own INF files. You'll fail WHQL if you
do, unless you do it with a co-installer.
Just let it use the OEM name. Why would you care?
--
- Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
SP_DEVINSTALL_PARAMS deviceInstallParams;
DWORD RegDataLength;
DWORD RegDataType;
ZeroMemory(&deviceInstallParams, sizeof(deviceInstallParams));
deviceInstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
if(SetupDiGetDeviceInstallParams(hDevInfo, pDid,
&deviceInstallParams))
{
HKEY hKey = SetupDiOpenDevRegKey(hDevInfo,
pDid,
DICS_FLAG_GLOBAL,
0,
DIREG_DRV,
KEY_READ
);
if(hKey != INVALID_HANDLE_VALUE)
{
//
// no such value exists, so there can't be an associated
driver
//
//
// obtain path of INF - we'll do a search on this specific
INF
//
ULONG regerr = RegQueryValueEx(hKey,
"InfPath",
NULL,
&RegDataType,
(PBYTE)deviceInstallParams.DriverPath,
&RegDataLength
);
now deviceInstallParams.DriverPath will be the generated inf name
I think this code was inspired by the "remove" sample, however I think this
has now been removed from the ddk(!). It might be worth looking at
Devcon...
hope this helps
jolyon
"Thomas" <t...@jaeger-toennies.com> wrote in message
news:ao1gq4$iisdl$2...@ID-34960.news.dfncis.de...
Thomas
"Jolyon Wright" <jwr...@saitek.com> schrieb im Newsbeitrag
news:ao3951$mph$1...@shale.ftech.net...
Thanks.
Thomas
"Tim Roberts" <ti...@probo.com> schrieb im Newsbeitrag
news:ak9aquseuhe3diodh...@4ax.com...
Anyway, the INF file used by the system can be returned as part of the call to
SetupCopyOEMInf() when you do the install. I save this privately in the registry
and use it when uninstalling. I use it to delete the INF/PNF pair prior to
reinstalling (not that it seems to be doing much good - it still prompts).
Would deleting all these other registry entries help with the prompting issue?
Martin
I believe that behaviour is part of the signed driver design. If you driver
is not signed then the system will always try and get a better one.
I could be wrong though :)
Chris
Martin
Thanks,
Jeff McCashland [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "Thomas" <t...@jaeger-toennies.com>
Do not install it by PnP, install it just as a service.
Max
According to the MSDN documentation, SetupUninstallOEMInf requires the full
path to the INF file in the Window INF directory. Will it really work with
the original INF filename? Is it an undocumented feature?
If it doesn't work with the original filename, you could use SetupCopyOEMInf
to locate the OEM*.INF file that is a copy of your original INF file. Pass
SP_COPY_REPLACEONLY as its CopyStyle (fourth) parameter. The function will
locate a copy of your INF file and return its filename in the
DestinationInfFileName (fifth) parameter. Then you can use
SetupUninstallOEMInf to uninstall the file. Be careful though, because
SetupCopyOEMInf will also find the copy of your file that has the original
(non-OEMxx) filename.
J.C.
I believe it's the PNF file that remembers where the files were copied from
and asks for that location when Windows uses the same INF to install a new
device. If you zap the PNF file, a new one will be created without the
source location information, but it won't solve your problem because it will
still ask for the location. To get rid of this prompt, you may want to copy
your binaries to the hard drive and install the driver from there. Then the
INF file will always find the files and never prompt you for disks.
J.C.
Thanks,
Jeff McCashland [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "J.C." <iesusc...@hotmail.com>
For Windows XP and later, you can use SetupDiBuildDriverInfoList with
DI_FLAGSEX_INSTALLEDDRIVER to get details about the installed driver.
Look at the devcon source code, function FindCurrentDriver in dump.cpp for
best way to get information about the installed driver.
--
Jamie Hunter (Hardware Experience Team)
------