bat文件内容
powershell -executionpolicy remotesigned -file "npcap.ps1"
其中npcap.ps1为powershell脚本
npcap-0.96.exe是windows的安装文件,此功能的是通过powershell调用安装程序,无窗口化安装npcap
Start-Process "npcap-0.96.exe" -ArgumentList "/S /npf_startup=yes /loopback_support=yes /dlt_null=no /admin_only=no /dot11_support=no /vlan_support=no /winpcap_mode=yes" -wait
echo "Npcap has been installed."
pause