使用条件更改WIX中的Windows防火墙
我正在尝试根据对话框中设置的属性对Windows防火墙进行更改。我可以在日志中看到,该属性设置正确,但无论属性的值如何,都会创建防火墙规则 我的代码是使用条件更改WIX中的Windows防火墙,wix,installation,windows-installer,Wix,Installation,Windows Installer,我正在尝试根据对话框中设置的属性对Windows防火墙进行更改。我可以在日志中看到,该属性设置正确,但无论属性的值如何,都会创建防火墙规则 我的代码是 如果ChgFirewall为False,为什么要更改防火墙 更新:我为设置CHGFIREWALL属性的对话框添加了代码 <Dialog Id="FirewallDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes"> <Co
如果ChgFirewall为False,为什么要更改防火墙
更新:我为设置CHGFIREWALL属性的对话框添加了代码
<Dialog Id="FirewallDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="Description" Type="Text" X="20" Y="20" Width="280" Height="40" Transparent="yes" NoPrefix="yes">
<Text>This program uses TCP ports 6501, 6501, and 6505 for coordinating information between workstations. These ports must be unblocked for it to work correctly</Text>
</Control>
<Control Id="Instructions" Type="Text" X="20" Y="70" Width="280" Height="30" Transparent="yes" NoPrefix="yes">
<Text>This installer can attempt to automatically modify the Windows Firewall for you, or you may manually modify the firewall settings.</Text>
</Control>
<Control Type="RadioButtonGroup" Property="CHGFIREWALL" Id="CHGFIREWALL" Width="340" Height="44" X="20" Y="120">
<RadioButtonGroup Property="CHGFIREWALL">
<RadioButton Text="Have the installer update the firewwall settings for Guru (Recommended)" Height="13" Value="True" Width="340" X="0" Y="0" />
<RadioButton Text="Manually update the firewall settings" Height="13" Value="False" Width="340" X="0" Y="15" />
</RadioButtonGroup>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<Publish Event="EndDialog" Value="Return"></Publish>
</Control>
<Control Id="CancelButton" Type="PushButton" Text="Cancel" Height="17" Width="56" X="180" Y="243" Cancel="yes">
<Publish Event="EndDialog" Value="Exit" />
</Control>
</Dialog>
<Property Id='CHGFIREWALL' Value='False' Secure='yes'/>
此程序使用TCP端口6501、6501和6505来协调工作站之间的信息。必须解锁这些端口才能正常工作
此安装程序可以尝试为您自动修改Windows防火墙,也可以手动修改防火墙设置。
这也是我对财产的定义
<Dialog Id="FirewallDlg" Width="370" Height="270" Title="[ProductName] Setup" NoMinimize="yes">
<Control Id="Description" Type="Text" X="20" Y="20" Width="280" Height="40" Transparent="yes" NoPrefix="yes">
<Text>This program uses TCP ports 6501, 6501, and 6505 for coordinating information between workstations. These ports must be unblocked for it to work correctly</Text>
</Control>
<Control Id="Instructions" Type="Text" X="20" Y="70" Width="280" Height="30" Transparent="yes" NoPrefix="yes">
<Text>This installer can attempt to automatically modify the Windows Firewall for you, or you may manually modify the firewall settings.</Text>
</Control>
<Control Type="RadioButtonGroup" Property="CHGFIREWALL" Id="CHGFIREWALL" Width="340" Height="44" X="20" Y="120">
<RadioButtonGroup Property="CHGFIREWALL">
<RadioButton Text="Have the installer update the firewwall settings for Guru (Recommended)" Height="13" Value="True" Width="340" X="0" Y="0" />
<RadioButton Text="Manually update the firewall settings" Height="13" Value="False" Width="340" X="0" Y="15" />
</RadioButtonGroup>
</Control>
<Control Id="Next" Type="PushButton" X="236" Y="243" Width="56" Height="17" Default="yes" Text="Next">
<Publish Event="EndDialog" Value="Return"></Publish>
</Control>
<Control Id="CancelButton" Type="PushButton" Text="Cancel" Height="17" Width="56" X="180" Y="243" Cancel="yes">
<Publish Event="EndDialog" Value="Exit" />
</Control>
</Dialog>
<Property Id='CHGFIREWALL' Value='False' Secure='yes'/>
第一步,将属性大写,并设置属性“secure=”yes“。这可确保将属性正确地传递给服务器进程
那么问题是如何设置属性?是由自定义操作设置的,还是在属性表或命令行中设置?该属性是使用自定义对话框设置的。我已将代码添加到原始问题中。使用Orca打开已编译的MSI,验证组件的条件字段是否符合预期。同时尝试动态更改此字段以测试不同的条件,然后进行测试运行。我不确定如何动态更改该值。我确实下载了Orca的一个版本,据我所知,这个属性看起来是正确的。对话框的属性(CHGFIREWALL)首先用于控制(s50)。条件字段为CHGFIREWALL=“True”,因此,您是否解决了此问题?否,我尚未解决此问题