All Projects → i-e-b → RunProcess

i-e-b / RunProcess

Licence: BSD-3-Clause license
Replacement for System.Diagnostics.Process

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to RunProcess

Androidprocesses
DEPRECATED
Stars: ✭ 1,770 (+11700%)
Mutual labels:  processes
AutoScreenshot
Automatic screenshot maker for Windows
Stars: ✭ 49 (+226.67%)
Mutual labels:  win32
creating-controls-in-assembler
Gitbook: https://mrfearless.gitbooks.io/creating-controls-in-assembler
Stars: ✭ 20 (+33.33%)
Mutual labels:  win32
MicaForEveryone
Mica For Everyone is a tool to enable backdrop effects on the title bars of Win32 apps on Windows 11.
Stars: ✭ 2,006 (+13273.33%)
Mutual labels:  win32
shellcode-loader
Shellcode Loader Engine for Windows
Stars: ✭ 24 (+60%)
Mutual labels:  win32
multitextor
Multiplatform command line text editor.
Stars: ✭ 27 (+80%)
Mutual labels:  win32
windows-process-monitor
A demo solution to illustrate approaches on getting information about processes and block/allow their start
Stars: ✭ 89 (+493.33%)
Mutual labels:  processes
libproc-rs
A rust library for getting information about running processes for Mac and Linux
Stars: ✭ 33 (+120%)
Mutual labels:  processes
emacs-bpr
No description or website provided.
Stars: ✭ 58 (+286.67%)
Mutual labels:  processes
xp
💻 Windows XP All Editions Universal Product Keys Collection
Stars: ✭ 247 (+1546.67%)
Mutual labels:  win32
wxAutoExcel
wxAutoExcel is a wxWidgets library attempting to make Microsoft Excel automation with C++ a bit less painful.
Stars: ✭ 27 (+80%)
Mutual labels:  win32
vaca
C++ Win32 wrapper to develop GUI apps
Stars: ✭ 64 (+326.67%)
Mutual labels:  win32
async-container
Scalable multi-thread multi-process containers for Ruby.
Stars: ✭ 58 (+286.67%)
Mutual labels:  processes
ClearProcesses
利用无障碍服务(AccessibilityService)批量清理后台进程
Stars: ✭ 75 (+400%)
Mutual labels:  processes
Win32Acrylic
Acrylic demo applications based on different technology stack
Stars: ✭ 35 (+133.33%)
Mutual labels:  win32
trident
Trident provides an easy way to pass the output of one command to any number of targets.
Stars: ✭ 36 (+140%)
Mutual labels:  processes
WindowsAppSDK
The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
Stars: ✭ 3,089 (+20493.33%)
Mutual labels:  win32
SoftLight
A shader-based Software Renderer Using The LightSky Framework.
Stars: ✭ 2 (-86.67%)
Mutual labels:  win32
effpi
Verified message-passing programs in Dotty
Stars: ✭ 42 (+180%)
Mutual labels:  processes
isotoxin
Isotoxin source
Stars: ✭ 69 (+360%)
Mutual labels:  win32

RunProcess

A process host for Windows (Vista and later) that is more reliable and flexible than System.Diagnostics.Process

Allows run-time reading from std error and output, and writing to std input.

The .Net Standard build has a few less features, but will fall-back to System.Diagnostics.Process on non-Windows systems.

Usage

Like this

using (var proc = new ProcessHost("my.exe", @"C:\temp\")) {
    proc.Start();
}

Or,

using (var proc = new ProcessHost(msBuildExe, projectDir)) {
    proc.Start(projectFile + " /t:Publish");
        
    int resultCode;
    if (!proc.WaitForExit(TimeSpan.FromMinutes(1), out resultCode))
    {
        proc.Kill();
        throw new Exception("Publish killed -- took too long");
    }

    File.AppendAllText(logFile, proc.StdOut.ReadAllText(Encoding.UTF8));
    File.AppendAllText(logFile, proc.StdErr.ReadAllText(Encoding.UTF8));

    if (resultCode != 0)
    {
        throw new Exception("Publish failure: see \"" + logFile + "\" for details");
    }
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].