Skip to content

Unifies the interfaces for running process on your computer or remotely by wmi or psexec

License

Notifications You must be signed in to change notification settings

NathanLBCooper/ProcessHelpers

Repository files navigation

ProcessHelpers

Some wrapper classes to simplify dealing with processes and allow interchanagable use of different process running tactics.

Simplifies process interaction using:

  • System.Diagnostics.Process
  • Windows Management Instrumentation (WMI)
  • PsExec

Unifies them under the two interfaces IProcess and IStoppable (and IStoppableProcess). Allows for explicit selection of Diposal behaviour upfront on IStoppable objects.

      public interface IProcess : IDisposable
      {
          /// Starts the process.
          void Start();

          /// Gets a value indicating whether this instance is process running.
          bool IsProcessRunning { get; }
      }
      
      
      
      public interface IStoppable
      {
          /// Sends a close message to the process
          void Stop();

          /// Sends a close message to the process. Immediately stops the process if it has not closed after maxExitWaitTime.
          void Stop(int maxExitWaitTime);

          /// Immediately stops the process.
          void Kill();
      }

About

Unifies the interfaces for running process on your computer or remotely by wmi or psexec

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages