• This repository has been archived on 23/Jun/2023
  • Stars
    star
    346
  • Rank 118,531 (Top 3 %)
  • Language
    C#
  • License
    Apache License 2.0
  • Created almost 7 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Warden.NET is an easy to use process management library for keeping track of processes on Windows.

Warden.NET

What Is It?

Warden.NET is a simple to use library for managing processes and their states.

Why?

With Rainway we're tasked with launching thousands of different applications from various third parties. To ensure launching games was a smooth process for the user, we needed a reliable way to keep track of game states.

The System.Diagnostics.Process class, while useful, does not have a concept for parent applications; In contrast, Windows itself tracks parents; however, it does not track grandparents, and processes can quickly become orphaned. Process.EnableRaisingEvents while useful, does not support monitoring URI-based launches' lifetime, processes with higher privileges than the calling application, or processes different sessions.

That is why we built Warden.NET.

Getting Started

As of Warden.NET 6.0.0 the calling application is no longer required to be running as Administrator. Some processes may be inaccessible however without those privileges.

Installing

Via Nuget

Install-Package Warden.NET

Enable Process Tracking

To initialize Warden to track processes you launch through it you must first call SystemProcessMonitor.Start(new MonitorOptions()); in the entry point of your application.

If you wish you can optionally subscribe to receive events when all untracked processes have started and stopped execution.

SystemProcessMonitor.OnProcessStarted += (sender, info) => Console.WriteLine(info);
SystemProcessMonitor.OnProcessStopped += (sender, info) => Console.WriteLine(info);

Launching a Process

The WardenProcess class allows you to start processes on the current machine in various context. It supports:

  • Using the operating system shell to start the process.
  • Creating a process as the current interactive user.
  • Launching a Microsoft Store / Universal Windows Platform app.

All of these methods support exit events and process family tree tracking. For more information please review the in-line documentation.

Impersonation

Warden supplies a built-in class, WardenImpersonator, that helps processes created by WardenProcess.StartAsUser execute code as the interactive user.

Notes

If you'd like to contribute we'll be happy to accept pull request. You can find a full example application in the repository.

More Repositories

1

bebop

An extremely simple, fast, efficient, cross-platform serialization format
C#
692
star
2

spitfire

An easy to use WebRTC Datachannels library for .NET applications.
C++
184
star
3

sachiel-net

A simple to use messaging framework built on protocol buffers.
C#
78
star
4

MetaPod

A cross-platform library for creating digitally signed portable executables with custom metadata.
Go
43
star
5

flutter_gamepad

A gamepad library for Flutter
Kotlin
33
star
6

bug-tracker

Report all issues found with Rainway here, or make suggestions for new features. 🐜
27
star
7

dot-env-generator

A source generator for C# that turns .env files into runtime constants.
C#
27
star
8

Forecast

A cross-platform utility for testing HTTP and WebSocket server connectivity.
C#
26
star
9

flutter_home_indicator

Flutter plugin to show/hide the iPhone X home indicator.
Swift
15
star
10

rainway-sdk-csharp-examples

Various examples of how to use the Rainway SDK with .NET
C#
12
star
11

rainway-sdk-web-demo

Various examples of how to use the Rainway SDK within the Browser
TypeScript
12
star
12

translations

Repository of language files for various Rainway user interfaces.
Python
10
star
13

low-level-homework

Homework for SDK developer applicants and other low level positions.
9
star
14

webrtc-build-scripts

A collection of scripts to build WebRTC on multiple platforms [WIP]
PowerShell
8
star
15

node-clangffi

Generate Typescript FFI bindings for C/C++ libraries using libclang and ffi-napi.
TypeScript
7
star
16

buffer-io

An intuitive library for reading and writing binary buffers
Rust
5
star
17

vscode-bebop

TypeScript
3
star
18

RainwayWebRTC

build output of our webrtc_ios fork
Objective-C
3
star
19

feature_detect

Flutter feature/UI mode detection plugin for Android.
Dart
2
star
20

proto-compiler

Utility to dedupe and merge protobuf schemas.
TypeScript
2
star
21

API-homework

Homework for API developer applicants.
2
star
22

rainway-sdk-native-examples

Various examples of how to use the Rainway SDK with C/C++
C++
2
star
23

web-homework

Homework assignment for web developer applicants.
Python
2
star
24

rainway-doc-format

Rainway documentation formatter. 📃🔍
TypeScript
2
star
25

rainway-sdk-echo-demo

C#
2
star
26

file-content-replacer

Github action to set the Assembly Version value in a csproj file
JavaScript
1
star
27

rainway-sdk-cxx-demo

C++ demo project for the Rainway SDK
C++
1
star