AlexS Posted November 7, 2008 Share 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! Link to comment Share on other sites More sharing options...
UltraFine Posted November 7, 2008 Share 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() ? Link to comment Share on other sites More sharing options...
AlexS Posted November 7, 2008 Author Share 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? Link to comment Share on other sites More sharing options...
UltraFine Posted November 7, 2008 Share 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 Link to comment Share on other sites More sharing options...
spudw2k Posted November 7, 2008 Share 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: Always On Top Tool ◊ AU History ◊ Deck of Cards ◊ HideIt ◊ ICU ◊ Icon Freezer ◊ Ipod Ejector ◊ Junos Configuration Explorer ◊ Link Downloader ◊ MD5 Folder Enumerator ◊ PassGen ◊ Ping Tool ◊ Quick NIC ◊ Read OCR ◊ RemoteIT ◊ SchTasksGui ◊ SpyCam ◊ System Scan Report Tool ◊ 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now