Could this be problem with Devcon Utility

Hi,
We are using the devcon utility to enable and disable a flash device.
It generally works fine but sometimes throws up a message
when “devcon disable” command is issued.

“: Disabled on reboot”
and
“The 1 device(s) are ready to be disabled. To disable the devices, restart the devices or reboot the system.”

This happens consistently when the explorer window is accessing the flash drive.

Is there a way to FORCE the disable to happen without issuing a system reboot?
Issuing “devcon restart” after this does not seem to help.

However, there seems to be a way to do this, but we don’t know how.
When we try to disable a device from the device manager with the explorer window accessing the flash drive, the following message is thrown up.
“Disabling this device will cause it to stop functioning. Do you really want to disable it?”

Selecting “Yes” will actually disable the device, inspite of the device being accessed through windows explorer.

Can someone please throw light on this.

Devcon and device manager are exactly the same. The “do you really wan
to disable it?” dialog is just a confirmation, it does nothing to any of
the applications which have handles to the device. I think you are
seeing some race conditions in this applications. A disable will cause
query remove->remove to occur. Any application which has an open handle
will be notified of the query remove and if the application is well
behaved, will close the handle. If all handles are closed, the remove
occurs. If any of the handles remain open, the query remove fails and
you are asked to reboot.

I would suggest that you turn on verbose setupapi logging and look in
the logs to see why the query remove vetoed.

d

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@mindtree.com
Sent: Monday, August 13, 2007 6:06 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Could this be problem with Devcon Utility

Hi,
We are using the devcon utility to enable and disable a flash device.
It generally works fine but sometimes throws up a message
when “devcon disable” command is issued.

“: Disabled on reboot”
and
“The 1 device(s) are ready to be disabled. To disable the devices,
restart the devices or reboot the system.”

This happens consistently when the explorer window is accessing the
flash drive.

Is there a way to FORCE the disable to happen without issuing a system
reboot?
Issuing “devcon restart” after this does not seem to help.

However, there seems to be a way to do this, but we don’t know how.
When we try to disable a device from the device manager with the
explorer window accessing the flash drive, the following message is
thrown up.
“Disabling this device will cause it to stop functioning. Do you really
want to disable it?”

Selecting “Yes” will actually disable the device, inspite of the device
being accessed through windows explorer.

Can someone please throw light on this.


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer