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

Bad INF, how to clean registry now?

398 views
Skip to first unread message

Ed Averill

unread,
Sep 12, 2005, 3:55:06 PM9/12/05
to
Ok, we got a bad INF file from a contractor and it's causing Windows 2000 to
try and load the "bad" driver when the device (a USB device) is connected.

Attempts to fix the registry by deleting the "bad" data resulted in regedit
telling me I couldn't delete the values (from CurrentControlSet, or
ControlSet1, or ControlSet2).

Is there any way to remove the bad data, or just force those entries to
point to the proper driver? Win2K is pretty dead-set on loading exactly what
I don't want it to...

All help appreciated, I'm going to hit the books as well.

Don Burn

unread,
Sep 12, 2005, 4:00:28 PM9/12/05
to
Below is my standard response for this:

Removing all traces of a driver from a system

When testing a device install developers want to cleanup the system so
they can try reinstalling the device, unfortunately this is something
Microsoft hasn't provided an easy way to do. The steps needed are:

1. Delete the files copied by the INF from the system.

2. Delete the INF and corresponding PNF files for the device, from the
inf directory off of the system root. Note, this file is named OEM*.INF and
OEM*.PNF if your driver is not signed. Searching the OEM*.INF files for
your device identifier will determine the OEM* name of your inf file.

3. If your device has a unique class, delete the registry entry in
HLKM\System\CurrentControlSet\Control\Class corresponding to the device
class you created for device. Note the key is named for the GUID of the
class.

4. If your device has a CoInstaller, delete the registry entry in
HLKM\System\CurrentControlSet\Control\CoDeviceInstallers corresponding to
the device class you created for device. Note the key is named for the GUID
of the class.

5. Delete the registry entries in HLKM\System\CurrentControlSet\Enum
corresponding to the device you specified in the inf file. For PCI devices
this is under the PCI key, for legacy devices this is under the Root key.
Note: if you specify more than one device in the inf, you will have an entry
for each device type the system has seen. DELETING THIS KEY REQUIRES
CHANGING ITS SECURITY FIRST.

6. Delete the registry entry in
HLKM\System\CurrentControlSet\Services corresponding to the driver you
specified in the inf file. Note this is the standard cleanup one would have
done in the pre-PNP days.

7. Reboot the system, now that was easy and intuitive wasn't it.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply


"Ed Averill" <EdAv...@discussions.microsoft.com> wrote in message
news:BE9721DA-9951-4F0E...@microsoft.com...

Ed Averill

unread,
Sep 12, 2005, 4:06:02 PM9/12/05
to
Whew, what a process!

Thanks for all this info, I'm off to work my poor machine over now.

I hope this fixes it! :-)

..ed..

Ed Averill

unread,
Sep 12, 2005, 4:44:09 PM9/12/05
to
Ugh - is there any way to change the security of the registry key without
having to code something up? I can't see anything in regedit to handle
that...

All help appreciated, every other step worked fine.

..ed..

Ed Averill

unread,
Sep 12, 2005, 4:47:07 PM9/12/05
to
Nevermind, was a flat-forehead error. Ran the wrong version of regedit!

..ed..

Don Burn

unread,
Sep 12, 2005, 4:49:20 PM9/12/05
to
Use regedt32, right click and change permissions.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

"Ed Averill" <EdAv...@discussions.microsoft.com> wrote in message
news:90E7B3B7-9158-49A7...@microsoft.com...

fat_boy

unread,
Sep 15, 2005, 9:27:03 AM9/15/05
to
for 2k: regedt32, click view-permissions from menu. Right
click-permissions only works on regedit XP

0 new messages