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

devcon and UpdateDriverForPlugAndPlayDevices

222 views
Skip to first unread message

Ash

unread,
Jan 22, 2010, 1:36:01 AM1/22/10
to
Hello,
I have a really weird problem. Normally I use devcon to install/update my
custom kernel mode display driver.

I have a custom installer that during an upgrade of my product does a
"devcon remove my_display_driver" and then a "devcon install
mydisplaydriver.inf my_display_driver".

On Windows XP devcon will let me remove an older version and install a new
version without rebooting in between. Upon reboot after the install portion,
everything is fine.

HOWEVER, on Win7 devcon lets me remove but fails during the install. This is
the error I get and I cannot find any information on it:

ndv: {Core Device Install} 18:21:07.500
inf: Opened INF: 'C:\Windows\INF\oem12.inf' ([strings])
inf: Saved PNF: 'C:\Windows\INF\oem12.PNF' (Language = 0409)
dvi: {DIF_ALLOW_INSTALL} 18:21:07.515
dvi: Using exported function 'DisplayClassInstaller' in
module 'C:\Windows\system32\DispCI.dll'.
dvi: Class installer == DispCI.dll,DisplayClassInstaller
dvi: No CoInstallers found
dvi: Class installer: Enter 18:21:07.531
!!! dvi: Class installer: failed(0xe000022b)!
!!! dvi: Error 0xe000022b: The class installer has denied
the request to install or upgrade this device.
dvi: {DIF_ALLOW_INSTALL - exit(0xe000022b)} 18:21:07.531
ndv: Device install status=0xe000022b


Any idea why I can't do an install right after a remove on Win7 ?? What does
this error mean exactly?

Mike [MSFT]

unread,
Jan 27, 2010, 5:35:48 PM1/27/10
to
It means that the display class installer determined the devnode is not in a
state where it can be installed. My wild guess would be that there is some
pending uninstall operation that won't be completed until you reboot and so
the class installer prevents a new install from cancelling the pending
uninstall operation. It's possible that your driver is not properly
handling the uninstall request.

-Mike

"Ash" <A...@discussions.microsoft.com> wrote in message
news:5C86E2A7-8A1D-4253...@microsoft.com...

Bo Skjøtt

unread,
Feb 10, 2010, 3:20:02 AM2/10/10
to
I am having a similar problem. The problem is that "devcon remove"
returns success on Windows 7, but in fact it doesn't remove the
driver. If you plug-in the device again you will see that the old
driver is still being used. I guess that is why your subsequent
"devcon install" fails.

Does anybody know why the "devcon remove" command works differently on
Windows 7 compared to XP and Vista?

Maxim S. Shatskih

unread,
Feb 10, 2010, 3:37:48 AM2/10/10
to
>I am having a similar problem. The problem is that "devcon remove"
> returns success on Windows 7, but in fact it doesn't remove the
> driver.

It removes the devnode though.

--
Maxim S. Shatskih
Windows DDK MVP
ma...@storagecraft.com
http://www.storagecraft.com

Mike [MSFT]

unread,
Feb 10, 2010, 6:35:17 PM2/10/10
to
"devcon remove" is not intended to remove the driver. As Maxim mentions it
removes the devnode and unloads the driver, but the driver files are left
behind. If you plug the device in again the drivers will be installed
again. To remove the driver package you can use "devcon dp_delete":
http://msdn.microsoft.com/en-us/library/aa906327.aspx.

Note that this also doesn't sound related to the original posters issue
since it sounds like reinstalling succeeds.

-Mike

"Maxim S. Shatskih" <ma...@storagecraft.com.no.spam> wrote in message
news:e3ylUxiq...@TK2MSFTNGP05.phx.gbl...

Maxim S. Shatskih

unread,
Feb 11, 2010, 5:47:29 AM2/11/10
to
> again. To remove the driver package you can use "devcon dp_delete":

At least on Win7, this actually deletes FileRepository and oem%d.inf/.pnf, but the .sys in system32\drivers and all non-devnode registry entries (SC database, event logging) - are left in place.

The OS will boot with this driver for the next time.

Mike [MSFT]

unread,
Feb 12, 2010, 3:55:19 PM2/12/10
to
There is no supported way of removing system32\drivers files. If you need
to do some sort of specialized cleanup you can use a coinstaller to handle
DIF_REMOVE.

-Mike

"Maxim S. Shatskih" <ma...@storagecraft.com.no.spam> wrote in message

news:uFnoeewq...@TK2MSFTNGP06.phx.gbl...

0 new messages