I search variants to format hard or usb disks programmatically. I founded api-function SHFormatDrive, but here use windows-dialog. To my mind, this method not bad, but how i could to hide/forbid this dialog. Anywhere, i continue search a way to format disks programmatically.
Use the Format method of the Win32_Volume class. Details here.
The correct way of doing it is to use Virtual Disk Service FormatPartition method.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With