Home page logo

Npcap Users' Guide


Please refer to the Npcap License for terms of use and redistribution.

The Npcap installer and uninstaller are easy to use in Graphical Mode (direct run) and Silent Mode (run with /S parameter).

Installer options

The installer accepts several command-line options that correspond to the options presented in the graphical interface (GUI). The options take the form /<name>=<value>, where <name> is one of /npf_startup, /loopback_support, /dlt_null, /admin_only, /dot11_support, /vlan_support, or /winpcap_mode.

The values for these options must be one of:

  • yes: select the option

  • no: unselect the option

  • enforced: select the option and make it unchangable in the GUI

  • disabled: unselect the option and make it unchangable in the GUI

There is also one option that does not appear in the GUI, which is /disable_restore_point=yes, which will prevent the installer from setting a system restore point. Windows may independently create a restore point because of the driver installation independent from this option.

The destination directory for installation can also be overridden by the /D option, with a few restrictions. First, it will only affect where Npcap keeps its installation logs and helper utilities. The driver and DLLs will always be installed into the appropriate directories below %SYSTEMROOT%\System32\. Second, the /D must be the last option in the command, and the path must not contain quotes. For example, to change the installation directory to C:\Path With Spaces\, the invocation would be: npcap-<version>.exe /D=C:\Path With Spaces

An example of Npcap installer options is (for both GUI Mode and Silent Mode):

/npf_startup=yes /loopback_support=yes /dlt_null=no /admin_only=yes /dot11_support=yes /vlan_support=yes /winpcap_mode=yes

  • /npf_startup=yes: Automatically start the Npcap driver at boot time

  • /loopback_support=yes: Support loopback traffic (Npcap Loopback Adapter will be created)

  • /dlt_null=no: Use DLT_EN10MB (Ethernet) as the Npcap Loopback Adapter's link layer protocol instead of the default DLT_NULL.

  • /admin_only=yes: Restrict Npcap driver's access to Administrators only

  • /dot11_support=yes: Support raw 802.11 traffic (and Monitor Mode) for wireless adapters

  • /vlan_support=yes: Support 802.1Q VLAN tag when capturing and sending data

  • /winpcap_mode=yes: Install Npcap in WinPcap API-compatible Mode

Uninstaller options

The uninstaller provided with Npcap also accepts some command-line options. The /Q flag means to skip the confirmation page and finish page in the uninstall wizard. So this option is only meaningful for GUI Mode. The /no_kill controls how the uninstaller handles processes that are still using Npcap at the time of uninstall. If /no_kill=yes is specified, then Npcap uninstaller will fail if there are still applications using Npcap driver or DLLs. If /no_kill=no is specified in silent mode, Npcap uninstaller will immediately terminate any command-line processes that are using Npcap (like a Nmap process that is still scanning), and wait for at most 15 seconds to gracefully terminate any GUI processes that are using Npcap (like Wireshark UI that is still capturing). gracefully means that if you are still capturing via Wireshark, Wireshark UI will prompt the user about whether to save the current capture to a pcap. So the user have 15 seconds to save his session. Note: although Npcap uninstaller won't terminate Wireshark UI processe immediately, the live capture stops immediately. This is because Wireshark UI uses command-line processes named dumpcap.exe to capture, and that command-line process will be terminated immediately. The default value for /no_kill is no, but if the graphical interface is used (without /S), the user will be prompted for what to do.

An example of Npcap uninstaller options is:

/S /Q /no_kill=yes

Disabled and enforced options for GUI Mode

We may disable or enforce certain options in the installer GUI to make them unselectable. This usually means that those options can easily cause compatibility issues and are considered not suitable for most users, or we think we need to enforce some rules for the Npcap API. Advanced users can still change their states via command-line parameters, which is described in following sections.

Fortunately, if a distributor wants to start the Npcap installer GUI and disable or enforce certain options for reasons like compatibility. It can also use the four value mechanism by setting the command-line parameters to disabled or enforced. For example, the following command will start an installer GUI with the dlt_null disabled and unselected:

npcap-<version>.exe /dlt_null=disabled

How to change options for GUI Mode

Default options for Npcap installer GUI can be changed. An example is:

npcap-<version>.exe /npf_startup=yes /loopback_support=yes /dlt_null=yes /admin_only=no /dot11_support=no /vlan_support=no /winpcap_mode=yes

Because most of these are the default values for these options, this example could be even simpler:

npcap-<version>.exe /winpcap_mode=yes

Running the installer directly without options will see Install Npcap in WinPcap API-compatible Mode UNCHECKED by default in the Installation Options page. However, the above two commands will launch the installer GUI, and in the Installation Options page, the Install Npcap in WinPcap API-compatible Mode option will be CHECKED by default.

How to change options for Silent Mode

An example of changing option features for silent installation is:

npcap-<version>.exe /S /admin_only=yes /dot11_support=yes /vlan_support=yes

  • If you doesn't specify a parameter key, it will take the default value. This is the same with the GUI.

  • The keys are case-insensitive.

  • The values are case-sensitive, only two values are permitted: yes or no.

[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]