是编程序的话,格式化硬盘的话就用winapi函数。

解决方案 »

  1.   

    以下是代码,请慎用,unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
      StdCtrls, ShellAPI;type
      TForm1 = class(TForm)
        Button1: TButton;
        procedure Button1Click(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}function SHFormatDrive(hWnd : HWND;Drive, fmtID, Options : WORD) : longint; stdcall; external  'shell32.dll';function FormatDisk(drive: Char): boolean;  //慎用此函数!!!!!
    var
      wDrive      : WORD;
      dtDrive      : string;
      rtcode:longint;
    begin
        wDrive := Ord(UpCase(drive)) - Ord('A');    rtcode := SHFormatDrive(Application.Handle, wDrive, $ffff, 0);
        if rtcode = -1 then
           result := false;    result := true;
    end;procedure TForm1.Button1Click(Sender: TObject);
    begin
      FormatDisk('A');  //格式化A盘
    end;
      

  2.   

    另外请看http://www.csdn.net/expert/Topic/2/2910.shtm
      

  3.   

    多血Crob(干净的袜子)!!!给分晚啦,亲凉解…… 
      

  4.   

    一个最简单的做法:在单元头引用 ShellApi然后调用如下代码即可。
    ShellExecute(self.Handle, 'open', 'format', ' A:', '', SW_SHOWDEFAULT );