1

i try to install manually winPcap with for GNS3-gui on windows :

  1. 7zip to extract winPcap4.1.3.exe

2.try regSrv32.exe the 3x dll (e.g %systemRoot%\sysWow64\packet.dll) but error

  1. create service (npf.sys) (%systemRoot%\system32\drivers) but when i check my sc query npf\Output: win32_exit_code 1275

so my service npf stopped & error when i try to start it

  • it's normal if i have exitCode 1275 when i install winPcap with GUI, i have 0 & all work but i don't want the gui only cli

so, someone can help me please i'm new with create file *.sys so, maybe something i forgot ?

thnk

drp01558
  • 21
  • 4

1 Answers1

1
<#
 solution Extract winPcap4.1.3 with 7zip installed
 after: put dll 32 bits & 64 bits + npf.sys (64bits)

 demo: https://github.com/pc-aide/Windows/blob/master/PowerShell/ARM/gns3_&_loopback/05-06-2022.ps1
#>

$pth_srcX32 = "d:\winPcap\x32\"
$pth_dllX32 = "C:\Windows\SysWOW64\"
$pth_srcX64 = "d:\winPcap\x64\"
$pth_dllX64 = "C:\Windows\System32\"
$pth_sys = "C:\Windows\System32\drivers\"

copy $pth_srcX64\packet.dll $pth_dllX64\Packet.dll
copy $pth_srcX64\npf.sys $pth_sys\npf.sys
copy $pth_srcX32\wpcap.dll $pth_dllX32\wpcap.dll
copy $pth_srcX32\pthreadVC.dll $pth_dllX32\pthreadVC.dll
copy $pth_srcX32\Packet.dll $pth_dllX32\Packet.dll
if (!(Test-Path "C:\Program Files (x86)\WinPcap")){new-item "C:\Program Files (x86)\" -Name WinPCap -ItemType Directory}
copy $pth_srcX32\rpcapd.exe "C:\Program Files (x86)\WinPCap\rpcapd.exe"

# app & 1st service
sc.exe create rpcapd type= own start= demand binPath= "C:\Program Files (x86)\WinPCap\rpcad.exe" DisplayName= "Remote Package Capture Protocol..."
# driver (*.sys - 2e service)
sc.exe create npf binPath= "system32\drivers\npf.sys" type= kernel start= auto error= normal tag= no DisplayName= "NetGroup Packet Filter Driver"
sc.exe start npf
drp01558
  • 21
  • 4
  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jun 06 '22 at 05:07
  • now, it' more clear ? – drp01558 Jun 07 '22 at 19:08