Call Windows format dialog

Posted in Others

One of the ways to format disc, is calling standard Windows format dialog. Use ShellExecute function for this.

ShellExecute(Application.Handle,
  'Open',
  // path to the rundll32.exe file. For example:
  'C:\Windows\System32\Rundll32.exe', 
  'Shell32.dll,SHFormatDrive',
  'C:\Windows',
  SW_SHOWNORMAL);