How could I program a disk formatting?

I am looking for options for formatting hard drives or USB drives programmatically. I founded api-function SHFormatDrive , but a dialog box is used here. In my opinion, this method is not bad, but how could I hide / prohibit this dialogue. Anywhere, I continue to search for a way to format disks programmatically.

+3
c ++ filesystems format
source share
3 answers

Use the Format method of the Win32_Volume class. Details here .

+4
source share

The correct way to do this is to use the Virtual Disk Service FormatPartition method .

+2
source share

On Windows systems, you can create a β€œsilent” format by using :: CreateProcess () to execute a DOS format command.

See these two links for more details. CreateProcess () API: http://www.codeproject.com/KB/cpp/9505Yamaha_1.aspx DOS format command: http://answers.yahoo.com/question/index?qid=20070712051040AAIny5w

Good luck

+1
source share

All Articles