| 关键词: nbsp FwApp FwMgr Profile CreateOLEObject HNetCfg Name AuthorizedApplic ProcessImageFile FwAuthorizedAppl |
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的防火墙了,不会再有拦截提示了! |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|