DIFx - DriverPackageUninstall()

Hi, I am using Driver Installation Frameworks to install/uninstall the
driver package for VISTA certificate. Now I have a problem when I tried to
uninstall the package. Actually I have multiple drivers in the package. The
uninstall takes so long to finish. Then I took a look at the setup log. From
the log it seems that the system takes 25 t0 30 seconds to uninstall each of
the drivers in the package. And there is a warning message from DIFXAPP.

*DIFXAPP: WARNING:We’ve waited a while for the service to get deleted, but
it did not get deleted yet. Will prompt for reboot

*Why this happened? Is this normal for using Driver Installation Frameworks?
Does anyone have any experience and idea about this delay issue? Thanks.

The followings are the messages in the setup log.

MSI (s) (C4:6C) [*18:18:11:381*]: Executing op:
ActionStart(Name=MsiUninstallDrivers,)
Action 18:18:11: MsiUninstallDrivers.
MSI (s) (C4:6C) [18:18:11:381]: Executing op:
CustomActionSchedule(Action=MsiUninstallDrivers,ActionType=3073,Source=BinaryData,Target=UninstallDriverPackages,CustomActionData=2.15{29EAAC8B-CBD3-43E7-AF22-EF92C4659B43}31MyDriverABCD)
MSI (s) (C4:24) [18:18:11:381]: Invoking remote custom action. DLL:
C:\WINDOWS\Installer\MSI1A.tmp, Entrypoint: UninstallDriverPackages
DIFXAPP: UninstallDriverPackages()
DIFXAPP: ‘CustomActionData’ property ‘DIFxApp Version’ is 2.1.
DIFXAPP: ‘CustomActionData’ property ‘UI Level’ is 5.
DIFXAPP: ‘CustomActionData’ property ‘componentId’ is
{29EAAC8B-CBD3-43E7-AF22-EF92C4659B43}.
DIFXAPP: ‘CustomActionData’ property ‘flags’ is 0x1F.
DIFXAPP: ‘CustomActionData’ property ‘ProductName’ is MyDriver.
DIFXAPP: ‘CustomActionData’ property ‘ManufacturerName’ is ABCD.
DIFXAPP: INFO: ENTER: DriverPackageUninstallW
DIFXAPP: INFO: Uninstalling driver package
C:\WINDOWS\system32\DRVSTORE\MyDriver_BC2DB65BC9879448BBD9769F8ACFD7D5F3E0705A\MyDriver.INF…
DIFXAPP: INFO: Unable to revert to a previous driver store for service
‘MyDriver’.
DIFXAPP: INFO: Will attempt to uninstall the driver.
DIFXAPP: INFO: The Stopping of device
‘IDE\DISKVMWARE_VIRTUAL_IDE_HARD_DRIVE___________00000001\3030303030303030303030303030303030303130’
was vetoed by
‘IDE\DiskVMware_Virtual_IDE_Hard_Drive___________00000001\3030303030303030303030303030303030303130’
(veto type 11195872)
DIFXAPP: INFO: Driver ‘MyDriver’ did not unload.
DIFXAPP: INFO: service ‘MyDriver’ was deleted.
*DIFXAPP: WARNING:We’ve waited a while for the service to get deleted, but
it did not get deleted yet. Will prompt for reboot*
DIFXAPP: INFO: Best effort to delete driver package files copied to
system…
DIFXAPP: INFO: Driver store entry
‘C:\WINDOWS\system32\DRVSTORE\MyDriver_BC2DB65BC9879448BBD9769F8ACFD7D5F3E0705A\MyDriver.INF’
removed.
DIFXAPP: SUCCESS:Uninstall completed.
DIFXAPP: INFO: RETURN: DriverPackageUninstallW (0x0)
DIFXAPP: INFO: driver store
‘C:\WINDOWS\system32\DRVSTORE\MyDriver_BC2DB65BC9879448BBD9769F8ACFD7D5F3E0705A\MyDriver.INF’
uninstalled.
DIFXAPP: INFO: deleted add remove programs key for
‘C:\WINDOWS\system32\DRVSTORE\MyDriver_BC2DB65BC9879448BBD9769F8ACFD7D5F3E0705A\MyDriver.INF’.
DIFXAPP: A reboot is needed to uninstall the driver package
‘{29EAAC8B-CBD3-43E7-AF22-EF92C4659B43}’.
DIFXAPP: RETURN: UninstallDriverPackages() 0 (0x0)
MSI (s) (C4:6C) [*18:18:37:771*]: Executing op:
ActionStart(Name=MsiUninstallDrivers,)
Action 18:18:37: MsiUninstallDrivers.
MSI (s) (C4:6C) [18:18:37:771]: Executing op:

No one has the same problem with me? My driver belongs to System Bus
Extender group. And It created a device object in its DriverEntry() which is
@Root\Legacy_MyDriver\0000 showed by DevCon.exe.

This uninstall delay is very reproducible for me. And it always happened
when DIFXAPP tried to delete the service. I also noticed the following
message.

The Stopping of device ‘ROOT\LEGACY_MYDRIVER\0000’ was vetoed by
‘Root\LEGACY_MYDRIVER\0000’ (veto type 1627406624).

What is the veto type 1627406624? And what does that mean? Why the device
couldn’t be stopped? Because it is a root enumerated device? Any changes
that I need to make for the driver?

When DIFXAPP issue the stop service and delete service requests, the service
manager will send any IRP to my driver? I didn’t see IRP coming down during
this DIFx uninstall.

Thanks.

C:\DIFxTest>DIFxInst.exe /u c:\DIFxTest\
DIFxInst: Uninstalling driver package.
[07/06/2009 14:44:27.0656] LOG Event: 1, ENTER:
DriverPackageUninstallW
[07/06/2009 14:44:27.0718] LOG Event: 1, Uninstalling driver package
c:\DIFxTest\MyDriver\MyDriver.INF…
[07/06/2009 14:44:27.0750] LOG Event: 1, Unable to revert to a previous
driver store for service ‘MyDriver’.
[07/06/2009 14:44:27.0750] LOG Event: 1, Will attempt to uninstall the
driver.
[07/06/2009 14:44:27.0781] LOG Event: 1, The Stopping of device
‘ROOT\LEGACY_MYDRIVER\0000’ was vetoed by ‘Root\LEGACY_MYDRIVER\0000’ (veto
type 1627406624)
[07/06/2009 14:44:27.0781] LOG Event: 1, Driver ‘MyDriver’ did not
unload.
[07/06/2009 14:44:27.0812] LOG Event: 1, service ‘MyDriver’ was
deleted.
[07/06/2009 14:44:52.0812] LOG Event: 2, We’ve waited a while for the
service to get deleted, but it did not get de
leted yet. Will prompt for reboot
[07/06/2009 14:44:52.0812] LOG Event: 1, Best effort to delete driver
package files copied to system…
[07/06/2009 14:44:52.0859] LOG Event: 1, Driver store entry
‘C:\WINDOWS\system32\DRVSTORE\MyDriver_53374386F47E139D39C5C8ECACF3AD1A5D27A901\MyDriver.INF’
removed.
[07/06/2009 14:44:52.0859] LOG Event: 0, Uninstall completed.
[07/06/2009 14:44:52.0859] LOG Event: 1, RETURN:
DriverPackageUninstallW (0x0)
SUCCESS: Uninstalled driver package.
INFO: Machine will have to be rebooted to complete uninstall.

Michael Zhu wrote:

No one has the same problem with me? My driver belongs to System Bus
Extender group. And It created a device object in its DriverEntry()
which is @Root\Legacy_MyDriver\0000 showed by DevCon.exe.

OK, so that means it’s not a plug-and-play device. Do you have an
unload routine defined, and is it being properly registered in your
driver object?

This uninstall delay is very reproducible for me. And it always
happened when DIFXAPP tried to delete the service. I also noticed the
following message.

The Stopping of device ‘ROOT\LEGACY_MYDRIVER\0000’ was vetoed by
‘Root\LEGACY_MYDRIVER\0000’ (veto type 1627406624).

That’s 61004120 in hex, although I wasn’t able to find out what that
means. Certainly, if you didn’t have your unload routine registered in
your device object, that would cause you to veto the stop request.

Are you able to stop the service from a command line with “net stop”?

What is the veto type 1627406624? And what does that mean? Why the
device couldn’t be stopped? Because it is a root enumerated device?
Any changes that I need to make for the driver?

As I understand it, this is not really a “root enumerated” device,
because that implies a plug-and-play device. The distinction is subtle,
and I could be inventing my own definition here.

When DIFXAPP issue the stop service and delete service requests, the
service manager will send any IRP to my driver? I didn’t see IRP
coming down during this DIFx uninstall.

No. Those are plug-and-play IRPs, and you are not a plug-and-play
device. Stopping the service causes the driver to be unloaded (if
possible). Deleting the service is entirely in the registry.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.