穿透防火墙[转帖]

    技术2024-11-01  30

    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;

    最新回复(0)