Finally works, but with your quemu version. I don't know why with the lastest version don't.
Thanks for all your help!!! now i've to learn how to get the physicaldrive number with drive letter
Greetings!!
Edit: I've found it:
Creating a vbs sript with this:
if WScript.Arguments.Count = 0 then
WScript.Echo "Missing parameters"
else
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colDiskDrives = objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive")
For Each objDrive In colDiskDrives
'Wscript.Echo objDrive.DeviceID & Wscript.Arguments.Item(0)
Device = objDrive.DeviceID
strDeviceID = Replace(objDrive.DeviceID, "\", "\\")
Set colPartitions = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _
strDeviceID & """} WHERE AssocClass = " & _
"Win32_DiskDriveToDiskPartition")
For Each objPartition In colPartitions
Set colLogicalDisks = objWMIService.ExecQuery _
("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _
objPartition.DeviceID & """} WHERE AssocClass = " & _
"Win32_LogicalDiskToPartition")
For Each objLogicalDisk In colLogicalDisks
if Wscript.Arguments.Item(0) = objLogicalDisk.DeviceID then
Wscript.Echo Device
end if
Next
Next
Next
end if
Then runing this command:
cscript /NoLogo script.vbs i:
i get the physical drive number:
\\.\PHYSICALDRIVE2
One question: Can i use your qemu and part of your batch file in my proyect?
Greetings
Edited by Danixu, 23 September 2014 - 06:41 AM.