Defines Uninitialized Drive, RAW Drive and Initialized Drive

Just starting out? Need help? Post your questions and find answers here.
hoangdiemtinh
User
User
Posts: 29
Joined: Wed Nov 16, 2022 1:51 pm

Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by hoangdiemtinh »

I create a VHD file and Mount it, then use DISKPART CLEAN command to delete all properties and partitions of its hard disk.
How to distinguish Uninitialized Drive, RAW Drive and Initialized Drive ?.
.
And if that hard drive is not initialized, how to initialize it without DISKPART.
.
Image
.
Image
.
Image
.
Thanks.
Last edited by hoangdiemtinh on Mon Nov 21, 2022 2:11 am, edited 1 time in total.
fryquez
Enthusiast
Enthusiast
Posts: 362
Joined: Mon Dec 21, 2015 8:12 pm

Re: Defines initialized and uninitialized hard drives

Post by fryquez »

An initialized disk does have a partition layout (usually MBR or GPT).

There is IOCTL_DISK_GET_PARTITION_INFO_EX or DRIVE_LAYOUT_INFORMATION_EX to get this information.
hoangdiemtinh
User
User
Posts: 29
Joined: Wed Nov 16, 2022 1:51 pm

Re: Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by hoangdiemtinh »

sorry, i'm a newbie, can't understand with brief hint. Thankyou anyway. I need an example.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8425
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Re: Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by netmaestro »

The bot would like an example - anyone?
BERESHEIT
User avatar
HeX0R
Addict
Addict
Posts: 980
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by HeX0R »

I doubt, that a bot would translate apps
hoangdiemtinh
User
User
Posts: 29
Joined: Wed Nov 16, 2022 1:51 pm

Re: Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by hoangdiemtinh »

Sorry for my bad English. I am from vietnam. NOT BOT :)
hoangdiemtinh
User
User
Posts: 29
Joined: Wed Nov 16, 2022 1:51 pm

Re: Defines Uninitialized Drive, RAW Drive and Initialized Drive

Post by hoangdiemtinh »

After few days, I found in WMI, but it need .NET Framework, this not work in WinPE :(

I query class Win32_DiskDrive, get CIMV2:Win32_DiskDrive.DeviceID="\\\\.\\PHYSICALDRIVE5" (5 = my VHD Disk), get Properties named Partitons (if 0 as Uninitialized Drive, this is right ?)

call @Chris
Please help
Post Reply