I want to use netsh.exe to modify an existing Windows firewall rule, to remove the "Programs" and "Services" part of the rule. In other words, I want to set it to "All programs that meet the specified conditions", and "Apply to all programs and services". I can't find a way.
This is what I tried:
netsh advfirewall firewall set rule name=MyRule new program=
Error: The application contains invalid characters or length
And:
netsh advfirewall firewall set rule name=MyRule new program=""
Error: The application contains invalid characters or length
And:
netsh advfirewall firewall set rule name=MyRule new program=''
Creates a program path that is literally ''
And:
netsh advfirewall firewall set rule name=MyRule new program=any
Creates a program path that is literally any
EDIT: I'm on Windows 7 so the PowerShell Set-NetFirewallRule cmdlet is not an option.