gpt4 book ai didi

inno-setup - 在 Innosetupscript 中添加出站防火墙规则

转载 作者:行者123 更新时间:2023-12-05 06:36:33 27 4
gpt4 key购买 nike

<分区>

有谁知道如何添加出站防火墙规则或如何在 innosetup 脚本中指定方向。我可以在不指定方向的情况下添加入站规则,但不能添加出站规则,

应该是这样的

FirewallObject := CreateOleObject('HNetCfg.FwAuthorizedApplication');
FirewallObject.ProcessImageFileName := FileName;
FirewallObject.Name := AppName;
FirewallObject.Scope := NET_FW_SCOPE_ALL;
FirewallObject.IpVersion := NET_FW_IP_VERSION_ANY;
FirewallObject.Enabled := True;
//I am not sure how to give direction here for outbound
//FirewallObject.Direction = NET_FW_RULE_DIR_OUT;
FirewallManager := CreateOleObject('HNetCfg.FwMgr');
FirewallProfile := FirewallManager.LocalPolicy.CurrentProfile;
FirewallProfile.AuthorizedApplications.Add(FirewallObject);

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com