Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to remove oemXX.inf

189 views
Skip to first unread message

Thomas

unread,
Oct 9, 2002, 11:06:52 AM10/9/02
to
On installing my driver, MyDevice.INF ist copied to OEMxx.INF and I copy
MyDevice.INF.
How can I uninstall the OEMxx.INF (I dont know the name windows created) or
how can I supress the OEMxx creating?

Thanks

Thomas

PS: OS is XP / 2K


C.B. Thomas

unread,
Oct 9, 2002, 12:23:27 PM10/9/02
to
You can enumerate the keys under
HKLM\System\Control\Class\{your class GUID} looking for a
key in which the "DriverDesc" and/or "InfSection" values
match what you know came from your installation. Then
the "InfPath" value twlls you the name that setup used
when it copied your inf file.

Good Luck,
Brent

>.
>

Tim Roberts

unread,
Oct 10, 2002, 3:05:54 AM10/10/02
to
"Thomas" <t...@jaeger-toennies.com> wrote:

>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.

Jolyon Wright

unread,
Oct 10, 2002, 3:10:24 AM10/10/02
to
where
SP_DEVINFO_DATA * pDid
HDEVINFO hDevInfo
are obtained by enumerating devices:

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

unread,
Oct 10, 2002, 4:21:21 AM10/10/02
to
Thanks.
But I don´t want to do it without CoInst.

Thomas

"Jolyon Wright" <jwr...@saitek.com> schrieb im Newsbeitrag
news:ao3951$mph$1...@shale.ftech.net...

Thomas

unread,
Oct 10, 2002, 4:19:40 AM10/10/02
to

>>Just let it use the OEM name. Why would you care?
Just remove MyDevice.INF quickly, and I don´t know the name and don´t want
to do it with class CoInst.

Thanks.
Thomas


"Tim Roberts" <ti...@probo.com> schrieb im Newsbeitrag
news:ak9aquseuhe3diodh...@4ax.com...

Martin Evans

unread,
Oct 10, 2002, 9:26:32 AM10/10/02
to
I've also been having INF problems, namely with Windows prompting for source
disks when attempting a reinstall. Any ideas?

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

Chris

unread,
Oct 10, 2002, 10:01:56 AM10/10/02
to
"Martin Evans" <mar...@browns.co.uk> wrote in message
news:3DA58008...@browns.co.uk...

> I've also been having INF problems, namely with Windows prompting for
source
> disks when attempting a reinstall. Any ideas?

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 Evans

unread,
Oct 10, 2002, 10:29:07 AM10/10/02
to
Thanks, I thought as much, unfortunately we produce a software only driver for
coms work which is constantly changing, the thought of trying to get things
signed in time is a worry, we have a new build every couple of days. Suppressing
the 'not signed' prompt is not a problem but asking for disks is, just trying
to find a workaround.

Martin

Jeff McCashland [MS]

unread,
Oct 10, 2002, 3:23:51 PM10/10/02
to
If you installed your INF using SetupCopyOEMInf, then I would just try
using SetupUninstallOEMInf passing the original name of your INF.


Thanks,
Jeff McCashland [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "Thomas" <t...@jaeger-toennies.com>

Maxim S. Shatskih

unread,
Oct 11, 2002, 11:18:52 AM10/11/02
to
> Thanks, I thought as much, unfortunately we produce a software only
driver for

Do not install it by PnP, install it just as a service.

Max

J.C.

unread,
Oct 14, 2002, 1:36:20 PM10/14/02
to
"Jeff McCashland [MS]" <je...@online.microsoft.com> wrote in message
news:AuJJ1JJcCHA.1640@cpmsftngxa09...

> If you installed your INF using SetupCopyOEMInf, then I would just try
> using SetupUninstallOEMInf passing the original name of your INF.
>

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.

J.C.

unread,
Oct 14, 2002, 1:57:59 PM10/14/02
to
"Martin Evans" <mar...@browns.co.uk> wrote in message
news:3DA58EB3...@browns.co.uk...

> Suppressing the 'not signed' prompt is not a problem but asking for disks
is...
>

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.


J.C.

unread,
Oct 14, 2002, 2:02:41 PM10/14/02
to

"Thomas" <t...@jaeger-toennies.com> wrote in message
news:ao1gq4$iisdl$2...@ID-34960.news.dfncis.de...
> On installing my driver, MyDevice.INF ist copied to OEMxx.INF and I copy
> MyDevice.INF.
> How can I uninstall the OEMxx.INF (I dont know the name windows created)
or
> how can I supress the OEMxx creating?
>
To suppress the creation of an OEMxx file, you may want to try copying your
MyDevice.INF file into the INF directory BEFORE installing the driver.


Jeff McCashland [MS]

unread,
Oct 15, 2002, 1:48:06 PM10/15/02
to
Nope, no undocumented feature. Further research into the code confirms
J.C. is correct. Additionally, you can find the final INF name in the
registry under HKLM\System\CCS\Control\Class\.

Thanks,
Jeff McCashland [MS]
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------

From: "J.C." <iesusc...@hotmail.com>

Jamie Hunter [MS]

unread,
Oct 17, 2002, 12:23:40 PM10/17/02
to
"Jeff McCashland [MS]" <je...@online.microsoft.com> wrote in message
news:Jn09mLHdCHA.1640@cpmsftngxa09...

> Nope, no undocumented feature. Further research into the code confirms
> J.C. is correct. Additionally, you can find the final INF name in the
> registry under HKLM\System\CCS\Control\Class\.
>
Let me add that you should use SetupDiOpenDevReg key to get to the key. This
will work for Windows 2000 through .Net, but may change in the future.

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)
------

0 new messages