Problem using Netsh to edit firewall settings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to add a new program to the XP Firewall settings, but I keep
getting an syntax error. I know the problem lies in the file location, but I
cannot seem to find the problem. Here is the Netsh command I am using:

netsh firewall add allowedprogram C:\Program Files\Microsoft
Office\office\Outlook.exe Outook Enable

I think the problem is the command netsh cannot see long file names.
However, I have tried to replace Program Files with progra~1 and Microsoft
Office with micros~1. That still comes back to me with a syntax error. I
have tested other programs that path to locations that do not have spaces in
their names. I have also tried to take out the space in both Program files
and Microsoft Office, but that comes back with unable to detect file location
error message. I was hoping someone would have an answer to this problem.
Thanks
 
Put quotes around the path and file name:

netsh firewall add allowedprogram "C:\Program Files\Microsoft Office\office\Outlook.exe" Outook Enable
 
Back
Top