Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: rino tenorio
  Where is rino tenorio?
 pasig
 Philippines
 rino tenorio
 To: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 Tags
Subject: RE: how to read the harddisk serial
Thread ID: 197716 Message ID: 197721 # Views: 42 # Ratings: 0
Version: Visual FoxPro 5 Category: Linux and VFP
Date: Monday, October 06, 2008 7:09:33 AM         
   


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

Thanks Anil but if the computer has 2 or more harddisk how will i know is the main harddisk?



COMPLETE THREAD
how to read the harddisk serial Posted by rino tenorio @ 10/6/2008 6:25:16 AM
RE: how to read the harddisk serial Posted by Anil Sharma @ 10/6/2008 6:34:47 AM
RE: how to read the harddisk serial Posted by rino tenorio @ 10/6/2008 7:09:32 AM
RE: how to read the harddisk serial Posted by rino tenorio @ 10/6/2008 7:09:33 AM
RE: how to read the harddisk serial Posted by Jun Tangunan @ 10/6/2008 7:18:46 AM
RE: how to read the harddisk serial Posted by Anil Sharma @ 10/6/2008 7:38:37 AM
RE: how to read the harddisk serial Posted by Anup Singh @ 10/6/2008 9:27:12 AM