cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
bezpal
Level 4

netsh open firewall port

IN basic MSI project I have the following CA (Image attached)
command line: netsh advfirewall firewall add rule name="MyAccess" protocol=TCP dir=in localport=18777 action=allow

But firewall port isn't getting opened. Any idea what's wrong?

Thanks
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

What happens if you do not ignore the exit code? Does it make a different if you use netsh.exe instead of just netsh? And specify [SystemFolder] (or whatever's correct) in the Working Directory field?

As an aside, actions that make system changes should be scheduled for deferred execution, usually in system context, so it might be worth changing that, too.
0 Kudos
bezpal
Level 4

Working Directory had to be set to SystemFolder

Thanks for the tip!:)
0 Kudos