Problem using Netsh to edit firewall settings

G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

Put quotes around the path and file name:

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

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
--------------------------------
Per user Group Policy Restrictions for XP Home and XP Pro
http://www.dougknox.com/xp/utils/xp_securityconsole.htm
--------------------------------
Please reply only to the newsgroup so all may benefit.
Unsolicited e-mail is not answered.

"Lord Dark Helmet" <Lord Dark Helmet@discussions.microsoft.com> wrote in message news:88D1CB50-E22F-4BB4-9B50-A0ED87B11813@microsoft.com...
>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
 
G

Guest

Guest
Archived from groups: microsoft.public.windowsxp.security_admin (More info?)

That got it. I knew it was something simple. Thank you.

"Doug Knox MS-MVP" wrote:

> Put quotes around the path and file name:
>
> netsh firewall add allowedprogram "C:\Program Files\Microsoft Office\office\Outlook.exe" Outook Enable
>
> --
> Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart Display\Security
> Win 95/98/Me/XP Tweaks and Fixes
> http://www.dougknox.com
> --------------------------------
> Per user Group Policy Restrictions for XP Home and XP Pro
> http://www.dougknox.com/xp/utils/xp_securityconsole.htm
> --------------------------------
> Please reply only to the newsgroup so all may benefit.
> Unsolicited e-mail is not answered.
>
> "Lord Dark Helmet" <Lord Dark Helmet@discussions.microsoft.com> wrote in message news:88D1CB50-E22F-4BB4-9B50-A0ED87B11813@microsoft.com...
> >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
>