> > Hi experts,
> > how can we read the Hard disk serial of the PC?? Thanks
>
>
>
> LOCAL strComputer, objWMIService, colItems, objItem
> CLEAR
> strComputer = "."
> objWMIService = GetObject("winmgmts:\\" + strComputer + "\root\cimv2")
> colItems = objWMIService.ExecQuery("Select * from Win32_DiskDrive",,48)
> For Each objItem in colItems
> ? "PNPDeviceID: " + objItem.PNPDeviceID &&Harddisk ID
> ? "Size: " + objItem.Size &&Harddisk Size its also unique.
> NEXT
>
>
>
>
>
>
> Anil
>
My BlogThanks Anil but if the computer has 2 or more harddisk how will i know is the main harddisk?