Tech Support > Microsoft Windows > Development Resources > Physical drive name
Physical drive name
Posted by CAHEK on April 8th, 2008


Hi all!
I need to display the name of my physical hard drive
anybody knows how to do this?

Posted by alfred on April 8th, 2008


CAHEK wrote:
-> Thread : List Physical Drives (c++ | WINAPI)

Posted by Boris on April 9th, 2008


Try this (save the below code into file foo.vbs, then from DOS command line
execute 'cscript foo.vbs'):

strComputer = "."
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonat e}!\\"
& strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive")
For Each objItem In colItems
wscript.echo "caption: " & objItem.caption & " ,deviceid: " &
objItem.deviceid
Next
<<<<<<<<<<<

Boris

"CAHEK" <h4cker_rus@hotmail.com> wrote in message
news:47fb2e58$0$902$ba4acef3@news.orange.fr...


Similar Posts