6

Because of the Java 7 firewall problem, I am trying to execute the following command as administrator but I get an error:

netsh advfirewall set global StatefulFTP disable

(German) "Der folgende Befehl wurde nicht gefunden: advfirewall"

In English, something like:

"The following command was not found: advfirewall"

I found a related problem, but I am not running Windows 64bit; I am using Windows Vista Business SP2 32bit.

A workaround is to disable the firewall, but that is not a good solution.

According to the Sun bug report, it is possible to change the firewall setting over the registry but I don't know how.

Any ideas?

Update

In the Microsoft documentation about netsh I found an article describing my error message. It explains that depending on the installation different contexts are available. I don't have the "netsh advfirewall" context on two different computers.

4
  • are you running the netsh command from CMD or from inside a Java Program?
    – Jeremy W
    Jun 1, 2012 at 13:37
  • from cmd started with "Run as Administrator" Jun 2, 2012 at 19:36
  • is the advanced firewall control panel available to you?
    – Jeremy W
    Jun 2, 2012 at 19:42
  • You mean the one in the managment console? Yes. Jun 3, 2012 at 14:33

2 Answers 2

5
+50

You may have an unregistered or missing helper dll within netsh

Run netsh show helper from and administrator command prompt and scan the output for the advfirewall context. If it is missing, run netsh add helper AUTHFWCFG.DLL to restore it.


Full list of netsh helpers (contexts) you may want to register

advfirewall: netsh add helper AUTHFWCFG.DLL
firewall: netsh add helper FWCFG.DLL
http: netsh add helper NSHHTTP.DLL
interface: netsh add helper IFMON.DLL
bridge: netsh add helper HNETMON.DLL
dhcpclient: netsh add helper DHCPCMONITOR.DLL
dnsclient, netio: netsh add helper NETIOHLP.DLL
ipsec: netsh add helper NSHIPSEC.DLL
lan: netsh add helper DOT3CFG.DLL
mbn: netsh add helper WWANCFG.DLL
namespace: netsh add helper NETIOHLP.DLL
nap: netsh add helper NAPMONTR.DLL
p2p: netsh add helper P2PNETSH.DLL
ras: netsh add helper RASMONTR.DLL
rpc: netsh add helper RPCNSH.DLL
trace: netsh add helper NETTRACE.DLL
wcn: netsh add helper WCNNETSH.DLL
wfp: netsh add helper NSHWFP.DLL
winhttp: netsh add helper WHHELPER.DLL
winsock: netsh add helper WSHELPER.DLL
wlan: netsh add helper WLANCFG.DLL

1
  • In Windows 11, netsh add helper AUTHFWCFG.DLL yields the error Initialization Function InitHelperDll in AUTHFWCFG.DLL failed to start with error code 15018
    – Joe
    Mar 17, 2023 at 5:55
1

You may need to run this with elevated privileges as administrator


How can I do that?

Use one of the following methods:

Why is this necessary?

According to Netsh Commands for Windows Firewall with Advanced Security you must have the required permissions to run the netsh advfirewall commands.

  • If you are a member of the Administrators group, and User Account Control is enabled on your computer, then run the commands from a command prompt with elevated permissions. To start a command prompt with elevated permissions, find the icon or Start menu entry that you use to start a command prompt session, right-click it, and then click Run as administrator.

  • If you are a member of the Network Operators group then you can run the commands from any command prompt.

  • If you are a not a member of Administrators or Network Operators, and have not been delegated any other permissions to run this command, then you can run only those commands that display, but do not change settings.

1
  • Thank you, I have elevated rights using the first method. Same problem. Jun 4, 2012 at 12:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .