以下是代码片段:
unit main ;
interface
uses Windows , Messages , SysUtils , Variants , Classes , Graphics , Controls , Forms , Dialogs , StdCtrls , ComCtrls , shellapi , txwblabel ;
type TFrmMain = class ( TForm ) ProgressBar1: TProgressBar ; LbMsg: TLabel ; Button1: TButton ; ListBox1: TListBox ; Label1: TLabel ; TxwbLabel1: TTxwbLabel ; procedure FormCreate ( Sender: TObject ) ; procedure Button1Click ( Sender: TObject ) ; private { Private declarations } public { Public declarations } end ;
var FrmMain: TFrmMain ;
implementation
{$R *.dfm}
procedure TFrmMain.Button1Click ( Sender: TObject ) ; var tmpStr: string ; begin Button1.Enabled := False ; Progressbar1.Position := 0 ; Progressbar1.Max := ListBox1.Items.Count ; for tmpStr in ListBox1.Items do begin Lbmsg.Caption := '正在处理:' + tmpStr ; Progressbar1.Position := Progressbar1.Position + 1 ; Application.ProcessMessages ; winexec ( Pchar ( 'Regsvr32.exe ' + tmpStr + ' /s-' ) , 1 ) ;
end ;
winexec ( 'rundll32.exeadvpack.dll/DelNodeRunDLL32%systemroot%\System32\dacui.dll' , 1 ) ; winexec ( 'rundll32.exeadvpack.dll/DelNodeRunDLL32%systemroot%\Catroot\icatalog.mdb' , 1 ) ; winexec ( 'Regsvr32.exe scrrun.dll mstinit.exe /setup /s-' , 1 ) ; winexec ( 'Regsvr32.exe msnsspc.dll /SspcCreateSspiReg /s-' , 1 ) ; winexec ( 'Regsvr32.exe msapsspc.dll /SspcCreateSspiReg /s-' , 1 ) ; winexec ( 'Regsvr32.exe proctexe.ocxmshta.exe/register /s-' , 1 ) ; Button1.Enabled := True ; Lbmsg.Caption := '修复完成' ; end ;
procedure TFrmMain.FormCreate ( Sender: TObject ) ; begin Label1.Caption := '因功能强大请慎重使用!软件带来后果自行负责'#13 + '适合不能在新窗口打开连接,不能执行某些脚本,'#13 + '以及其它的IE疑难杂症!' ; end ;
end.
|