Jump to content

Recommended Posts

Posted

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...

Posted

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

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
  • Recently Browsing   0 members

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