qube Posted December 29, 2007 Share Posted December 29, 2007 Can I Scan New hardware Chanhed ? by using Autoit script thank Call me "Queen of Pain" :) Link to comment Share on other sites More sharing options...
LarryDalooza Posted December 29, 2007 Share Posted December 29, 2007 use devcon... http://support.microsoft.com/?kbid=311272devcon rescanI wrote the same functionality with wmi ... slow and deleted ... so go to above link.Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
MadBoy Posted December 29, 2007 Share Posted December 29, 2007 use devcon... http://support.microsoft.com/?kbid=311272 devcon rescan I wrote the same functionality with wmi ... slow and deleted ... so go to above link. Lar. As far as i know Larry you also wrote this: Local Const $CM_LOCATE_DEVNODE_NORMAL = 0 Local Const $CR_SUCCESS = 0 $status = DllCall("cfgmgr32.dll", "int", "CM_Locate_DevNode", "int*", 0, "int", 0, "int", $CM_LOCATE_DEVNODE_NORMAL) If Not ($status[0] = $CR_SUCCESS) Then MsgBox(4096, "", "CM_Locate_DevNode failed: " & $status[0]) Return 0 EndIf $status = DllCall("cfgmgr32.dll", "int", "CM_Reenumerate_DevNode", "int", $status[1], "int", 0) If Not ($status[0] = $CR_SUCCESS) Then MsgBox(4096, "", "CM_Reenumerate_DevNode failed: " & $status[0]) Return 0 EndIf And it's not slow Works like a charm My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
LarryDalooza Posted December 29, 2007 Share Posted December 29, 2007 thanks grasshopper... Lar. AutoIt has helped make me wealthy Link to comment Share on other sites More sharing options...
qube Posted January 4, 2008 Author Share Posted January 4, 2008 Thank dude Call me "Queen of Pain" :) Link to comment Share on other sites More sharing options...
qube Posted January 4, 2008 Author Share Posted January 4, 2008 code is very well but it not work with my program. my program is "use to disable and enable usbstorage" normally my pc is disable substorage with this code RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","start","reg_dword","3") while i need to use usbtorage i just run this code RegWrite ("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR","start","reg_dword","4") then i must replug the flash drive after that the computer found my flash drive. the problem is what way i re scan flash drive but not replug my flash drive. i tried code that you gave me but it didn't work. Call me "Queen of Pain" :) 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