让你的程序通过XP防火墙
2008-07-15 16:25:01 www.hackbase.com 来源:互联网
procedure TForm1.Button1Click(Sender: TObject);var FwMgr,Profile,FwApp: variant;begin FwMgr := CreateOLEObject('HNetCfg.FwMgr'); Profile := FwMgr.LocalPolicy.CurrentProfile; FwApp := Create ...
procedure TForm1.Button1Click(Sender: TObject);
var
FwMgr,Profile,FwApp: variant;
begin
FwMgr := CreateOLEObject('HNetCfg.FwMgr');
Profile := FwMgr.LocalPolicy.CurrentProfile;
FwApp := CreateOLEObject('HNetCfg.FwAuthorizedApplication');
FwApp.Name :='我的测试'; //显示名字
FwApp.ProcessImageFileName := Application.ExeName; //要通过的程序
FwApp.Enabled := true;
Profile.AuthorizedApplications.Add(FwApp);
end;
这样,你的软件就能通过XP的防火墙了,不会再有拦截提示了!
var
FwMgr,Profile,FwApp: variant;
begin
FwMgr := CreateOLEObject('HNetCfg.FwMgr');
Profile := FwMgr.LocalPolicy.CurrentProfile;
FwApp := CreateOLEObject('HNetCfg.FwAuthorizedApplication');
FwApp.Name :='我的测试'; //显示名字
FwApp.ProcessImageFileName := Application.ExeName; //要通过的程序
FwApp.Enabled := true;
Profile.AuthorizedApplications.Add(FwApp);
end;
这样,你的软件就能通过XP的防火墙了,不会再有拦截提示了!
责任编辑:黑客基地
本文引用网址:








