Problem using Netsh to edit firewall settings

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
 
D

Doug Knox MS-MVP

Put quotes around the path and file name:

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top