kalandro Posted May 19, 2008 Posted May 19, 2008 I want to obtain USB serial number (Not Drivegetserial) and vendor id. there is a program called "usbdeview" takes serialnumber of usb mass storages. is there any way to obtain like this porgram. I searched the all of forum,but I didnt find. Not drive get serial because if I format usb mass storage this serial will change.I want to obtain serial number which is cant change with any format. Thanks all...
evilertoaster Posted May 19, 2008 Posted May 19, 2008 (edited) ...The question as you state it does not really relate to autoit yet.Hum well here's the google search for you I guess-http://forums.microsoft.com/MSDN/ShowPost....25&SiteID=1http://home.hot.rr.com/graye/Articles/USB_SerialNumbers.htmhttp://www.codeproject.com/KB/cs/hard_disk_serialno.aspxHave fun.Also- DriveGetSerial() might work jsut as well Edited May 19, 2008 by evilertoaster
kalandro Posted May 19, 2008 Author Posted May 19, 2008 thank you but my code is here;(not all is mine) may be fix this Dim $var dim $serial $strComputer = "." $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") $colEvents = $objWMIService.ExecNotificationQuery _ ("Select * From __InstanceOperationEvent Within 5 Where " _ & "TargetInstance isa 'Win32_LogicalDisk' and " _ & "TargetInstance.DriveType = 2" ) While 1 $objEvent = $colEvents.NextEvent $var= $objEvent.TargetInstance.DeviceId $serial= DriveGetSerial( & $var "\" ) ;I dont want drivegetserial because it can be change If $serial= 1224475543 Then ;This is volume serial number of my Usb and it can be change with format: MsgBox(4096,"Test","right usb",10) ElseIf $serial <> 1224475543 Then MsgBox(4096,"Test","wrong usb",10) EndIf WEnd
evilertoaster Posted May 19, 2008 Posted May 19, 2008 Don't like beating a dead horse-http://www.autoitscript.com/forum/index.php?showtopic=57202
kalandro Posted May 19, 2008 Author Posted May 19, 2008 thanks for great help evilertoaster nice job. I will examine...
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