AlexS 0 Report post Posted November 7, 2008 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! Share this post Link to post Share on other sites
UltraFine 0 Report post Posted November 7, 2008 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() ? Share this post Link to post Share on other sites
AlexS 0 Report post Posted November 7, 2008 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? Share this post Link to post Share on other sites
UltraFine 0 Report post Posted November 7, 2008 (edited) 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, etcalso 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 November 7, 2008 by L0veUK Share this post Link to post Share on other sites
spudw2k 165 Report post Posted November 7, 2008 (edited) search the forum for dismount, Eject, USB, etcalso 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. Edited November 7, 2008 by spudw2k Spoiler Things I've Made: AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System UpTime ◊ Transparency Machine ◊ VMWare ESX BuilderMisc Code Snippets: ADODB Example ◊ CheckHover ◊ Detect SafeMode ◊ DynEnumArray ◊ GetNetStatData ◊ HashArray ◊ IsBetweenDates ◊ Local Admins ◊ Make Choice ◊ Recursive File List ◊ Remove Sizebox Style ◊ Retrieve PNPDeviceID ◊ Retreive SysListView32 Contents ◊ Set IE Homepage ◊ Tickle Expired Password ◊ Transpose ArrayProjects: Drive Space Usage GUI ◊ LEDkIT ◊ Plasma_kIt ◊ Scan Engine Builder ◊ SpeeDBurner ◊ SubnetCalcCool Stuff: AutoItObject UDF ◊ Extract Icon From Proc ◊ GuiCtrlFontRotate ◊ Hex Edit Funcs ◊ Run binary ◊ Service_UDF Share this post Link to post Share on other sites