Windows Background Service to Capture Network Traffic using Pktmon
dotnet new worker -n PktmonService
- Worker.cs
- Program.cs
- PktmonService.csproj
dotnet publish -c Release -r win-x64 --self-contained
- Refer to https://learn.microsoft.com/en-us/dotnet/core/deploying/ for publishing types
sc create PktmonService binpath= "path/to/service/PktmonService.exe" start= auto
sc start PktmonService
sc query PktmonService
sc stop PktmonService