Jump to content

Monitoring USB


AlexS
 Share

Recommended Posts

Hi forum,

I'm wondering if there's a way for AutoIT to monitor connected USB devices, and either stop one from being removed or by reconnecting it after it has been disconnected.

I have an internal card reader that is connected through the internal USB, so the only way to reconnect the device physically after removing it through the "Safely Remove Hardware" dialog is to restart the computer or open the thing up and disconnect it. It would be nice to have it be reconnected any time myself or someone else disconnects it this way.

Thanks in advance!

Link to comment
Share on other sites

Hi forum,

I'm wondering if there's a way for AutoIT to monitor connected USB devices, and either stop one from being removed or by reconnecting it after it has been disconnected.

I have an internal card reader that is connected through the internal USB, so the only way to reconnect the device physically after removing it through the "Safely Remove Hardware" dialog is to restart the computer or open the thing up and disconnect it. It would be nice to have it be reconnected any time myself or someone else disconnects it this way.

Thanks in advance!

can you read the help file for DriveGetDrive() , While...WEnd , For...Next , DriveGetStatus() ?
Link to comment
Share on other sites

can you read the help file for DriveGetDrive() , While...WEnd , For...Next , DriveGetStatus() ?

Ok, this will help me find my drives when they are connected. These will not help me change a device from "ready to be removed" state back to "ready" state though. Any other suggestions?

Link to comment
Share on other sites

Ok, this will help me find my drives when they are connected. These will not help me change a device from "ready to be removed" state back to "ready" state though. Any other suggestions?

search the forum for dismount, Eject, USB, etc

also there is a good example by rasim for USB scripts in example scripts.

did you see DriveGetStatus() ? please explain more what you are trying to do.

Edited by L0veUK
Link to comment
Share on other sites

search the forum for dismount, Eject, USB, etc

also there is a good example by rasim for USB scripts in example scripts.

did you see DriveGetStatus() ? please explain more what you are trying to do.

I think he's trying to solve the age old question of "how do I remount a removed disk drive usb device without unpluggin and plugging it back in." So far no has achieved this yet Alex. 'Bout the only way I've found (which by no means is elegant) is to uninstall USB Controller and then Scan for Hardware changes to reinstall it. This also works if you remove just the USB device, but only if the device was NOT "safely removed".

Slightly more elegant (not much) is to simply disable the USB controller(s) and re-enable them. :mellow:

Edited by spudw2k
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...